From c7a8205c01eb60dc340ba7f0d11be46fb80536ab Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 16 Sep 2025 19:32:21 +0100 Subject: [PATCH 01/43] POC PostgREST implementation --- portal-db/Makefile | 58 + portal-db/README.md | 2 +- portal-db/api/README.md | 670 +++ portal-db/api/codegen/codegen-client.yaml | 10 + portal-db/api/codegen/codegen-models.yaml | 9 + portal-db/api/codegen/generate-openapi.sh | 76 + portal-db/api/codegen/generate-sdks.sh | 237 + portal-db/api/openapi/openapi.json | 1695 ++++++ portal-db/api/postgrest/init.sql | 274 + portal-db/api/postgrest/postgrest.conf | 33 + portal-db/api/scripts/generate-sdks.sh | 239 + portal-db/docker-compose.yml | 37 +- portal-db/{init => schema}/001_schema.sql | 0 portal-db/sdk/go/README.md | 236 + portal-db/sdk/go/client.go | 5761 +++++++++++++++++++++ portal-db/sdk/go/go.mod | 25 + portal-db/sdk/go/go.sum | 54 + portal-db/sdk/go/models.go | 893 ++++ portal-db/testdata/test-data.sql | 89 + 19 files changed, 10395 insertions(+), 3 deletions(-) create mode 100644 portal-db/Makefile create mode 100644 portal-db/api/README.md create mode 100644 portal-db/api/codegen/codegen-client.yaml create mode 100644 portal-db/api/codegen/codegen-models.yaml create mode 100755 portal-db/api/codegen/generate-openapi.sh create mode 100755 portal-db/api/codegen/generate-sdks.sh create mode 100644 portal-db/api/openapi/openapi.json create mode 100644 portal-db/api/postgrest/init.sql create mode 100644 portal-db/api/postgrest/postgrest.conf create mode 100644 portal-db/api/scripts/generate-sdks.sh rename portal-db/{init => schema}/001_schema.sql (100%) create mode 100644 portal-db/sdk/go/README.md create mode 100644 portal-db/sdk/go/client.go create mode 100644 portal-db/sdk/go/go.mod create mode 100644 portal-db/sdk/go/go.sum create mode 100644 portal-db/sdk/go/models.go create mode 100644 portal-db/testdata/test-data.sql diff --git a/portal-db/Makefile b/portal-db/Makefile new file mode 100644 index 000000000..ae35b0cd9 --- /dev/null +++ b/portal-db/Makefile @@ -0,0 +1,58 @@ +# Portal DB API Makefile +# Provides convenient commands for managing the PostgREST API + +.PHONY: postgrest-up postgrest-down postgrest-logs +.PHONY: setup-db generate-openapi generate-sdks test-api clean + +# ============================================================================ +# SERVICE MANAGEMENT +# ============================================================================ + +postgrest-up: ## Start PostgREST API service and PostgreSQL DB + @echo "๐Ÿš€ Starting Portal DB API services..." + cd .. && docker compose up -d postgres postgrest + @echo "โœ… Services started!" + @echo " PostgreSQL DB: localhost:5435" + @echo " PostgREST API: http://localhost:3000" + +postgrest-down: ## Stop PostgREST API service and PostgreSQL DB + @echo "๐Ÿ›‘ Stopping Portal DB API services..." + cd .. && docker compose down + @echo "โœ… Services stopped!" + +postgrest-logs: ## Show logs from PostgREST API service and PostgreSQL DB + cd .. && docker compose logs -f + +# ============================================================================ +# DATABASE SETUP +# ============================================================================ + +setup-db: ## Set up database roles and permissions for API access + @echo "๐Ÿ”ง Setting up database roles and permissions..." + @if ! docker ps | grep -q path-portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " cd .. && make portal_db_up"; \ + exit 1; \ + fi + @echo " Applying API database setup..." + docker exec -i path-portal-db psql -U portal_user -d portal_db < postgrest/schema.sql + @echo "โœ… Database setup completed!" + @echo " Created roles: web_anon, web_user, web_admin" + @echo " Applied row-level security policies" + @echo " Created API helper functions" + +# ============================================================================ +# API GENERATION +# ============================================================================ + +generate-openapi: ## Generate OpenAPI specification from PostgREST + @echo "๐Ÿ“ Generating OpenAPI specification..." + cd api/codegen && ./generate-openapi.sh + +generate-sdks: ## Generate Go SDK from OpenAPI spec + @echo "๐Ÿ”ง Generating Go SDK..." + @echo " Note: Requires Node.js and oapi-codegen" + cd api/codegen && ./generate-sdks.sh + +generate-all: generate-openapi generate-sdks ## Generate OpenAPI spec and Go SDK + @echo "โœจ All generation tasks completed!" diff --git a/portal-db/README.md b/portal-db/README.md index afc34b36f..0625a1585 100644 --- a/portal-db/README.md +++ b/portal-db/README.md @@ -59,7 +59,7 @@ make | grep --line-buffered "portal" ### `make` Targets -- `make portal_db_up` creates the Portal DB with the base schema (`./init/001_schema.sql`) and runs the Portal DB on port `:5435`. +- `make portal_db_up` creates the Portal DB with the base schema (`./schema/001_schema.sql`) and runs the Portal DB on port `:5435`. - `make portal_db_down` stops running the local Portal DB. - `make portal_db_env` creates and inits the Database, and helps set up the local development environment. - `make portal_db_clean` stops the local Portal DB and deletes the database and drops the schema. diff --git a/portal-db/api/README.md b/portal-db/api/README.md new file mode 100644 index 000000000..cdac49551 --- /dev/null +++ b/portal-db/api/README.md @@ -0,0 +1,670 @@ +# Portal DB PostgREST API + +This directory contains the PostgREST API setup for the Portal Database, providing a RESTful API automatically generated from your PostgreSQL schema. + +## ๐Ÿš€ Quick Start + +```bash +# 1. Start the portal database (from parent directory) +cd .. && make portal_db_up + +# 2. Set up API database roles and permissions (from api directory) +cd api && make setup-db + +# 3. Start the API services (PostgreSQL + PostgREST) +make up + +# 4. Generate OpenAPI spec and Go SDK +make generate-all + +# 5. Test the API +curl http://localhost:3000/networks +``` + +## ๐Ÿ“‹ Table of Contents + +- [Overview](#overview) +- [Architecture](#architecture) +- [Getting Started](#getting-started) +- [API Endpoints](#api-endpoints) +- [Authentication](#authentication) +- [SDK Generation](#sdk-generation) +- [Development](#development) +- [Deployment](#deployment) +- [Troubleshooting](#troubleshooting) + +## ๐Ÿ” Overview + +This PostgREST API provides: + +- **Automatic REST API** generation from your PostgreSQL schema +- **Type-safe Go SDK** with automatic code generation +- **OpenAPI 3.0 specification** for integration +- **Row-level security** for data access control +- **JWT authentication** for secure access +- **CORS support** for web applications + +### Key Features + +- โœ… **Zero-code API generation** - PostgREST introspects your database schema +- โœ… **Secure by default** - Row-level security policies protect sensitive data +- โœ… **Standards-compliant** - OpenAPI 3.0 specification (converted from Swagger 2.0) +- โœ… **Go SDK generation** - Type-safe client using oapi-codegen +- โœ… **Rich querying** - Filtering, sorting, pagination, and joins +- โœ… **Docker-based deployment** - Easy containerized setup + +## ๐Ÿ—๏ธ Architecture + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Client Apps โ”‚ โ”‚ Go SDK โ”‚ +โ”‚ (HTTP clients) โ”‚ โ”‚ (Type-safe) โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ PostgREST API โ”‚ โ”‚ + โ”‚ (Port 3000) โ”‚ โ”‚ + โ”‚ OpenAPI 3.0 Spec โ”‚ โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ PostgreSQL Database โ”‚ โ”‚ + โ”‚ Portal DB (Port 5435) โ”‚ โ”‚ + โ”‚ Row-Level Security โ”‚ โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ oapi-codegen โ”‚ โ”‚ + โ”‚ SDK Generation Tool โ”‚โ—„โ”€โ”€โ”€โ”˜ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +### Components + +- **PostgREST**: Auto-generates REST API from PostgreSQL schema +- **PostgreSQL**: Portal database with row-level security policies +- **oapi-codegen**: Generates type-safe Go SDK from OpenAPI specification +- **OpenAPI 3.0**: API specification (converted from PostgREST's Swagger 2.0) + +## ๐ŸŽฏ Getting Started + +### Prerequisites + +- Docker and Docker Compose [[memory:8858267]] +- Make (for convenient commands) +- Node.js (for OpenAPI conversion): `brew install node` +- Go 1.22+ (for SDK generation): `brew install go` +- Your portal database running (see [parent README](../README.md)) + +### Installation + +1. **Start the portal database** (if not already running): + ```bash + cd .. && make portal_db_up + ``` + +2. **Set up API database roles**: + ```bash + make setup-db + ``` + +3. **Start the API services**: + ```bash + make up + ``` + +4. **Verify the setup**: + ```bash + make test-api + ``` + +### Services URLs + +- **PostgreSQL Database**: `localhost:5435` +- **PostgREST API**: http://localhost:3000 +- **OpenAPI Specification**: http://localhost:3000/ (with `Accept: application/openapi+json`) + +## ๐ŸŒ API Endpoints + +### Public Endpoints (No Authentication Required) + +| Method | Endpoint | Description | +| ------ | -------------------- | ---------------------------------- | +| `GET` | `/networks` | List all supported networks | +| `GET` | `/services` | List all available services | +| `GET` | `/portal_plans` | List all portal subscription plans | +| `GET` | `/service_endpoints` | List service endpoint types | + +### Protected Endpoints (Authentication Required) + +| Method | Endpoint | Description | +| ------ | --------------------------------- | ----------------------------------------- | +| `GET` | `/organizations` | List organizations (filtered by access) | +| `GET` | `/portal_accounts` | List portal accounts (user's access only) | +| `GET` | `/portal_applications` | List applications (user's access only) | +| `POST` | `/portal_applications` | Create new application | +| `PUT` | `/portal_applications?id=eq.{id}` | Update application | +| `GET` | `/api/current_user_info` | Get current user information | +| `GET` | `/api/user_accounts` | Get user's accessible accounts | +| `GET` | `/api/user_applications` | Get user's accessible applications | + +### Query Features + +PostgREST provides powerful querying capabilities: + +#### Basic Filtering +```bash +# Get only active services +curl "http://localhost:3000/services?active=eq.true" + +# Get Ethereum mainnet service specifically +curl "http://localhost:3000/services?service_id=eq.ethereum-mainnet" + +# Get services with compute units greater than 1 +curl "http://localhost:3000/services?compute_units_per_relay=gt.1" + +# Get services using pattern matching +curl "http://localhost:3000/services?service_name=ilike.*Ethereum*" +``` + +#### Field Selection & Sorting +```bash +# Select only specific fields +curl "http://localhost:3000/services?select=service_id,service_name,active" + +# Sort by service name ascending +curl "http://localhost:3000/services?order=service_name.asc" + +# Sort by multiple fields +curl "http://localhost:3000/services?order=active.desc,service_name.asc" +``` + +#### Pagination & Counting +```bash +# Paginate results (limit 2, skip first 2) +curl "http://localhost:3000/services?limit=2&offset=2" + +# Get total count in response header +curl -I -H "Prefer: count=exact" "http://localhost:3000/services" + +# Get count with results +curl -H "Prefer: count=exact" "http://localhost:3000/services" +``` + +#### Advanced Filtering +```bash +# Multiple conditions (AND) +curl "http://localhost:3000/services?active=eq.true&compute_units_per_relay=eq.1" + +# OR conditions +curl "http://localhost:3000/services?or=(service_id.eq.ethereum-mainnet,service_id.eq.polygon-mainnet)" + +# NULL checks +curl "http://localhost:3000/services?service_owner_address=is.null" + +# Array operations +curl "http://localhost:3000/services?service_domains=cs.{eth-mainnet.gateway.pokt.network}" +``` + +#### Resource Embedding (JOINs) +```bash +# Get services with their endpoints +curl "http://localhost:3000/services?select=service_id,service_name,service_endpoints(endpoint_type)" + +# Get services with fallback URLs +curl "http://localhost:3000/services?select=*,service_fallbacks(fallback_url)" + +# Get portal plans with accounts count +curl "http://localhost:3000/portal_plans?select=*,portal_accounts(count)" +``` + +#### Aggregation +```bash +# Count services by status +curl "http://localhost:3000/services?select=active,count=exact&group_by=active" + +# Get unique endpoint types +curl "http://localhost:3000/service_endpoints?select=endpoint_type&group_by=endpoint_type" +``` + +For complete query syntax, see [PostgREST Documentation](https://postgrest.org/en/stable/api.html). + +## ๐Ÿ“‹ Practical Examples + +### CRUD Operations + +#### Creating Resources (POST) +```bash +# Create a new service fallback +curl -X POST http://localhost:3000/service_fallbacks \ + -H "Content-Type: application/json" \ + -d '{ + "service_id": "ethereum-mainnet", + "fallback_url": "https://eth-mainnet.alchemy.com/v2/fallback" + }' + +# Create a new service endpoint +curl -X POST http://localhost:3000/service_endpoints \ + -H "Content-Type: application/json" \ + -d '{ + "service_id": "base-mainnet", + "endpoint_type": "REST" + }' + +# Create with return preference (get created object back) +curl -X POST http://localhost:3000/service_fallbacks \ + -H "Content-Type: application/json" \ + -H "Prefer: return=representation" \ + -d '{ + "service_id": "polygon-mainnet", + "fallback_url": "https://polygon-mainnet.nodereal.io/v1/fallback" + }' +``` + +#### Reading Resources (GET) +```bash +# Basic reads +curl "http://localhost:3000/services" +curl "http://localhost:3000/networks" +curl "http://localhost:3000/portal_plans" + +# Filtered reads with practical filters +curl "http://localhost:3000/services?active=eq.true&select=service_id,service_name" +curl "http://localhost:3000/portal_plans?plan_usage_limit=not.is.null" +curl "http://localhost:3000/service_endpoints?endpoint_type=eq.JSON-RPC" + +# Complex queries +curl "http://localhost:3000/services?select=service_id,service_name,service_endpoints(endpoint_type),service_fallbacks(fallback_url)&active=eq.true" +``` + +#### Updating Resources (PATCH) +```bash +# Enable a service +curl -X PATCH "http://localhost:3000/services?service_id=eq.base-mainnet" \ + -H "Content-Type: application/json" \ + -d '{"active": true}' + +# Update service with multiple fields +curl -X PATCH "http://localhost:3000/services?service_id=eq.arbitrum-one" \ + -H "Content-Type: application/json" \ + -d '{ + "quality_fallback_enabled": true, + "hard_fallback_enabled": true + }' + +# Update with return preference +curl -X PATCH "http://localhost:3000/services?service_id=eq.polygon-mainnet" \ + -H "Content-Type: application/json" \ + -H "Prefer: return=representation" \ + -d '{"compute_units_per_relay": 2}' +``` + +#### Deleting Resources (DELETE) +```bash +# Delete specific fallback +curl -X DELETE "http://localhost:3000/service_fallbacks?service_id=eq.ethereum-mainnet&fallback_url=eq.https://eth-mainnet.alchemy.com/v2/fallback" + +# Delete with conditions +curl -X DELETE "http://localhost:3000/service_endpoints?service_id=eq.base-mainnet&endpoint_type=eq.REST" +``` + +### Response Format Examples + +#### JSON (Default) +```bash +curl "http://localhost:3000/services?limit=1" +# Returns: [{"service_id":"ethereum-mainnet","service_name":"Ethereum Mainnet",...}] +``` + +#### CSV Format +```bash +curl -H "Accept: text/csv" "http://localhost:3000/services?select=service_id,service_name,active" +# Returns: CSV formatted data +``` + +#### Single Object (Not Array) +```bash +curl -H "Accept: application/vnd.pgrst.object+json" \ + "http://localhost:3000/services?service_id=eq.ethereum-mainnet" +# Returns: {"service_id":"ethereum-mainnet",...} (object, not array) +``` + +### Business Logic Examples + +#### Get Complete Service Information +```bash +# Get service with all related data +curl "http://localhost:3000/services?select=*,service_endpoints(*),service_fallbacks(*)&service_id=eq.ethereum-mainnet" +``` + +#### Portal Analytics Queries +```bash +# Count services by network +curl "http://localhost:3000/services?select=network_id,count=exact&group_by=network_id" + +# Get plan distribution +curl "http://localhost:3000/portal_accounts?select=portal_plan_type,count=exact&group_by=portal_plan_type" + +# List all endpoint types available +curl "http://localhost:3000/service_endpoints?select=endpoint_type&group_by=endpoint_type" +``` + +#### Health Check Queries +```bash +# Check API connectivity +curl -I "http://localhost:3000/networks" + +# Verify data integrity +curl "http://localhost:3000/services?select=count=exact&active=eq.true" + +# Get system overview +curl "http://localhost:3000/?select=*" | jq '.paths | keys' +``` + +### Error Handling Examples + +#### Testing Error Responses +```bash +# Invalid table +curl "http://localhost:3000/nonexistent" +# Returns: 404 with error details + +# Invalid column +curl "http://localhost:3000/services?invalid_column=eq.test" +# Returns: 400 with column error + +# Invalid data type +curl -X POST "http://localhost:3000/services" \ + -H "Content-Type: application/json" \ + -d '{"service_id": 123}' +# Returns: 400 with type validation error + +# Constraint violation +curl -X POST "http://localhost:3000/services" \ + -H "Content-Type: application/json" \ + -d '{"service_id": "test", "service_domains": []}' +# Returns: 400 with constraint error +``` + +## ๐Ÿ” Authentication + +### JWT Authentication + +The API supports JWT (JSON Web Token) authentication for secure access to protected endpoints. + +#### Using a Token + +Include the JWT token in the `Authorization` header: + +```bash +curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \ + http://localhost:3000/portal_accounts +``` + +**Note**: JWT token generation and validation would need to be implemented separately or integrated with your existing authentication system. + +### Row-Level Security (RLS) + +The API implements PostgreSQL Row-Level Security to ensure users can only access their own data: + +- **Users** can only view/edit their own profile +- **Portal Accounts** are filtered by user membership +- **Applications** are filtered by account access +- **Admin users** have elevated permissions + +## ๐Ÿ› ๏ธ SDK Generation + +### Automatic Generation + +Generate the OpenAPI specification and type-safe Go SDK: + +```bash +# Generate both OpenAPI spec and Go SDK +make generate-all + +# Or generate individually +make generate-openapi # Generate OpenAPI specification +make generate-sdks # Generate Go SDK +``` + +### Go SDK Usage + +```go +package main + +import ( + "context" + "fmt" + "net/http" + + portaldb "github.com/grove/path/portal-db/sdk/go" +) + +func main() { + // Create client with typed responses + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + panic(err) + } + + ctx := context.Background() + + // Example 1: Get all active services + resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ + Active: &[]string{"eq.true"}[0], + }) + if err != nil { + panic(err) + } + + if resp.StatusCode() == 200 && resp.JSON200 != nil { + services := *resp.JSON200 + fmt.Printf("Found %d active services:\n", len(services)) + for _, service := range services { + fmt.Printf("- %s (%s)\n", service.ServiceName, service.ServiceId) + } + } + + // Example 2: Get specific service with endpoints + serviceResp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ + ServiceId: &[]string{"eq.ethereum-mainnet"}[0], + Select: &[]string{"*,service_endpoints(endpoint_type)"}[0], + }) + if err != nil { + panic(err) + } + + if serviceResp.StatusCode() == 200 && serviceResp.JSON200 != nil { + service := (*serviceResp.JSON200)[0] + fmt.Printf("Service: %s supports endpoints: %v\n", + service.ServiceName, service.ServiceEndpoints) + } +} + +// Example with authentication +func authenticatedExample() { + token := "your-jwt-token" + + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + panic(err) + } + + ctx := context.Background() + + // Add JWT token to requests + requestEditor := func(ctx context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil + } + + // Make authenticated request + resp, err := client.GetPortalAccountsWithResponse(ctx, + &portaldb.GetPortalAccountsParams{}, requestEditor) + if err != nil { + panic(err) + } + + if resp.StatusCode() == 200 && resp.JSON200 != nil { + accounts := *resp.JSON200 + fmt.Printf("User has access to %d accounts\n", len(accounts)) + } +} +``` + +**For complete Go SDK documentation, see [SDK README](../sdk/go/README.md)** + +## ๐Ÿ”ง Development + +### Development Environment + +Start a full development environment with all services: + +```bash +make dev # Starts PostgREST, Swagger UI, and Auth Service +``` + +### Available Commands + +| Command | Description | +| --------------- | --------------------------- | +| `make help` | Show all available commands | +| `make up` | Start API services | +| `make down` | Stop API services | +| `make logs` | Show service logs | +| `make status` | Show service status | +| `make test-api` | Test API endpoints | +| `make clean` | Clean up and reset | + +### Database Schema Changes + +When you modify the database schema: + +1. **Update the schema** in `../schema/001_schema.sql` +2. **Restart the database**: + ```bash + cd .. && make portal_db_clean && make portal_db_up + ``` +3. **Reapply API setup**: + ```bash + make setup-db + ``` +4. **Regenerate SDKs**: + ```bash + make generate-all + ``` + +## ๐Ÿš€ Deployment + +### Production Considerations + +1. **Security**: + - Change default JWT secrets + - Use environment-specific configuration + - Enable HTTPS/TLS + - Configure proper CORS origins + +2. **Performance**: + - Tune PostgreSQL connection pool + - Add API rate limiting + - Configure caching headers + - Monitor database performance + +3. **Monitoring**: + - Add health checks + - Configure logging + - Set up metrics collection + - Monitor API response times + +### Container Deployment + +The API can be deployed using the provided Docker Compose setup: + +```bash +# Production deployment +docker compose -f docker-compose.yml up -d +``` + +### Kubernetes Deployment + +For Kubernetes deployment, create appropriate manifests based on the Docker Compose configuration. Consider using your existing Helm charts pattern. + +## ๐Ÿ” Troubleshooting + +### Common Issues + +#### API Not Starting + +```bash +# Check if portal database is running +docker ps | grep path-portal-db + +# Check PostgREST logs +make api-logs + +# Verify database connection +make test-api +``` + +#### Authentication Issues + +```bash +# Verify auth service is running +curl http://localhost:3001/health + +# Check JWT token validity +curl -X POST http://localhost:3001/auth/verify \ + -H "Content-Type: application/json" \ + -d '{"token":"YOUR_TOKEN"}' +``` + +#### Permission Errors + +```bash +# Reapply database setup +make setup-db + +# Check user permissions in database +psql postgresql://portal_user:portal_password@localhost:5435/portal_db \ + -c "SELECT * FROM portal_users WHERE portal_user_email = 'your-email@example.com';" +``` + +### Useful Commands + +```bash +# View all available routes +curl http://localhost:3000/ + +# Check database connection +curl http://localhost:3000/networks + +# Test authentication +curl -H "Authorization: Bearer YOUR_TOKEN" \ + http://localhost:3000/portal_accounts + +# View OpenAPI specification +curl -H "Accept: application/openapi+json" \ + http://localhost:3000/ +``` + +## ๐Ÿ“š Additional Resources + +- [PostgREST Documentation](https://postgrest.org/en/stable/) +- [PostgreSQL Row Level Security](https://www.postgresql.org/docs/current/ddl-rowsecurity.html) +- [OpenAPI Specification](https://swagger.io/specification/) +- [JWT.io](https://jwt.io/) - JWT token debugging + +## ๐Ÿค Contributing + +When contributing to the API: + +1. Update documentation for any new endpoints +2. Regenerate SDKs after schema changes +3. Test both authenticated and public endpoints +4. Update this README for any new features + +## ๐Ÿ“„ License + +This API setup is part of the Grove PATH project. See the main project license for details. diff --git a/portal-db/api/codegen/codegen-client.yaml b/portal-db/api/codegen/codegen-client.yaml new file mode 100644 index 000000000..1935e80fa --- /dev/null +++ b/portal-db/api/codegen/codegen-client.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json +package: portaldb +output: ../../sdk/go/client.go +generate: + client: true + models: false + embedded-spec: true +output-options: + skip-fmt: false + skip-prune: false diff --git a/portal-db/api/codegen/codegen-models.yaml b/portal-db/api/codegen/codegen-models.yaml new file mode 100644 index 000000000..b540a8fb0 --- /dev/null +++ b/portal-db/api/codegen/codegen-models.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json +package: portaldb +output: ../../sdk/go/models.go +generate: + models: true + embedded-spec: false +output-options: + skip-fmt: false + skip-prune: false diff --git a/portal-db/api/codegen/generate-openapi.sh b/portal-db/api/codegen/generate-openapi.sh new file mode 100755 index 000000000..f255fdcb7 --- /dev/null +++ b/portal-db/api/codegen/generate-openapi.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +# Generate OpenAPI specification from PostgREST +# This script fetches the OpenAPI spec and saves it to openapi/ + +set -e + +# Configuration +POSTGREST_URL="${POSTGREST_URL:-http://localhost:3000}" +OUTPUT_DIR="../openapi" +OUTPUT_FILE="$OUTPUT_DIR/openapi.json" + +echo "๐Ÿ” Generating OpenAPI specification from PostgREST..." + +# Create output directory if it doesn't exist +mkdir -p "$OUTPUT_DIR" + +# Wait for PostgREST to be ready +echo "โณ Waiting for PostgREST to be ready at $POSTGREST_URL..." +max_attempts=30 +attempt=1 + +while [ $attempt -le $max_attempts ]; do + if curl -s -f "$POSTGREST_URL/" > /dev/null 2>&1; then + echo "โœ… PostgREST is ready!" + break + fi + + if [ $attempt -eq $max_attempts ]; then + echo "โŒ PostgREST is not responding after $max_attempts attempts" + echo " Make sure PostgREST is running: docker compose up postgrest" + exit 1 + fi + + echo " Attempt $attempt/$max_attempts - waiting 2 seconds..." + sleep 2 + ((attempt++)) +done + +# Fetch OpenAPI specification +echo "๐Ÿ“ฅ Fetching OpenAPI specification..." +if curl -s -f -H "Accept: application/openapi+json" "$POSTGREST_URL/" > "$OUTPUT_FILE"; then + echo "โœ… OpenAPI specification saved to: $OUTPUT_FILE" + + # Pretty print the JSON + if command -v jq >/dev/null 2>&1; then + echo "๐ŸŽจ Pretty-printing JSON..." + jq '.' "$OUTPUT_FILE" > "${OUTPUT_FILE}.tmp" && mv "${OUTPUT_FILE}.tmp" "$OUTPUT_FILE" + fi + + # Display some info about the generated spec + echo "" + echo "๐Ÿ“Š OpenAPI Specification Summary:" + echo " File size: $(wc -c < "$OUTPUT_FILE" | tr -d ' ') bytes" + + if command -v jq >/dev/null 2>&1; then + echo " OpenAPI version: $(jq -r '.openapi // "unknown"' "$OUTPUT_FILE")" + echo " API title: $(jq -r '.info.title // "unknown"' "$OUTPUT_FILE")" + echo " API version: $(jq -r '.info.version // "unknown"' "$OUTPUT_FILE")" + echo " Number of paths: $(jq -r '.paths | length' "$OUTPUT_FILE")" + echo " Number of schemas: $(jq -r '.components.schemas | length' "$OUTPUT_FILE")" + fi + + echo "" + echo "๐ŸŒ You can view the API documentation at:" + echo " Swagger UI: http://localhost:8080" + echo " Raw OpenAPI: $POSTGREST_URL/" + +else + echo "โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL" + echo " Make sure PostgREST is running and accessible" + exit 1 +fi + +echo "" +echo "โœจ OpenAPI specification generation completed successfully!" diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh new file mode 100755 index 000000000..cf686d94f --- /dev/null +++ b/portal-db/api/codegen/generate-sdks.sh @@ -0,0 +1,237 @@ +#!/bin/bash + +# Generate Go SDK from OpenAPI specification using oapi-codegen +# This script generates a Go client SDK for the Portal DB API + +set -e + +# Configuration +OPENAPI_DIR="../openapi" +OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" +OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" +GO_OUTPUT_DIR="../../sdk/go" +CONFIG_MODELS="./codegen-models.yaml" +CONFIG_CLIENT="./codegen-client.yaml" +POSTGREST_URL="http://localhost:3000" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification using oapi-codegen..." + +# ============================================================================ +# PHASE 1: ENVIRONMENT VALIDATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 1: Environment Validation${NC}" + +# Check if Go is installed +if ! command -v go >/dev/null 2>&1; then + echo -e "${RED}โŒ Go is not installed. Please install Go first.${NC}" + echo " - Mac: brew install go" + echo " - Or download from: https://golang.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Go is installed: $(go version)${NC}" + +# Check if oapi-codegen is installed +if ! command -v oapi-codegen >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing oapi-codegen..." + go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest + + # Verify installation + if ! command -v oapi-codegen >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install oapi-codegen. Please check your Go installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" + +# Check if PostgREST is running +echo "๐ŸŒ Checking PostgREST availability..." +if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then + echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" + echo " Please ensure PostgREST is running:" + echo " cd .. && docker compose up -d" + echo " cd api && docker compose up -d" + exit 1 +fi + +echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" + +# Check if configuration files exist +for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do + if [ ! -f "$config_file" ]; then + echo -e "${RED}โŒ Configuration file not found: $config_file${NC}" + echo " This should have been created as a permanent file." + exit 1 + fi +done + +echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" + +# ============================================================================ +# PHASE 2: SPEC RETRIEVAL & CONVERSION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" + +# Create openapi directory if it doesn't exist +mkdir -p "$OPENAPI_DIR" + +# Clean any existing files to start fresh +echo "๐Ÿงน Cleaning previous OpenAPI files..." +rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" + +# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) +echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." +if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" > "$OPENAPI_V2_FILE"; then + echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" + exit 1 +fi + +# Verify the file was created and has content +if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then + echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" + +# Convert Swagger 2.0 to OpenAPI 3.x +echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." + +# Check if swagger2openapi is available +if ! command -v swagger2openapi >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing swagger2openapi converter..." + if command -v npm >/dev/null 2>&1; then + npm install -g swagger2openapi + else + echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 + fi +fi + +if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" + exit 1 +fi + +# Fix boolean format issues in the converted spec (in place) +echo "๐Ÿ”ง Fixing boolean format issues..." +sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" +rm -f "${OPENAPI_V3_FILE}.bak" + +# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version +echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." +rm -f "$OPENAPI_V2_FILE" + +echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" + +# ============================================================================ +# PHASE 3: SDK GENERATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 3: SDK Generation${NC}" + +echo "๐Ÿน Generating Go SDK in separate files for better readability..." + +# Clean previous generated files +echo "๐Ÿงน Cleaning previous generated files..." +rm -f "$GO_OUTPUT_DIR/models.go" "$GO_OUTPUT_DIR/client.go" + +# Generate models file (data types and structures) +echo " Generating models.go..." +if ! oapi-codegen -config "$CONFIG_MODELS" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate models${NC}" + exit 1 +fi + +# Generate client file (API client and methods) +echo " Generating client.go..." +if ! oapi-codegen -config "$CONFIG_CLIENT" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate client${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" + +# ============================================================================ +# PHASE 4: MODULE SETUP +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 4: Module Setup${NC}" + +# Navigate to SDK directory for module setup +cd "$GO_OUTPUT_DIR" + +# Run go mod tidy to resolve dependencies +echo "๐Ÿ”ง Resolving dependencies..." +if ! go mod tidy; then + echo -e "${RED}โŒ Failed to resolve Go dependencies${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Go dependencies resolved${NC}" + +# Test compilation +echo "๐Ÿ” Validating generated code compilation..." +if ! go build ./...; then + echo -e "${RED}โŒ Generated code does not compile${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" + +# Return to scripts directory +cd - >/dev/null + +# ============================================================================ +# SUCCESS SUMMARY +# ============================================================================ + +echo "" +echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" +echo "" +echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" +echo " API Docs: $OPENAPI_V3_FILE" +echo " SDK: $GO_OUTPUT_DIR" +echo " Module: github.com/grove/path/portal-db/sdk/go" +echo " Package: portaldb" +echo "" +echo -e "${BLUE}๐Ÿ“š SDK Files:${NC}" +echo " โ€ข models.go - Generated data models and types (updated)" +echo " โ€ข client.go - Generated SDK client and methods (updated)" +echo " โ€ข go.mod - Go module definition (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" +echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" +echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" +echo "" +echo -e "${BLUE}๐Ÿš€ Next steps:${NC}" +echo " 1. Review the generated models: cat $GO_OUTPUT_DIR/models.go | head -50" +echo " 2. Review the generated client: cat $GO_OUTPUT_DIR/client.go | head -50" +echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" +echo " 4. Check the README: cat $GO_OUTPUT_DIR/README.md" +echo "" +echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" +echo " โ€ข Generated files: models.go (data types), client.go (API methods)" +echo " โ€ข Permanent files: go.mod, README.md" +echo " โ€ข Better readability: types separated from client logic" +echo " โ€ข Run this script after database schema changes" +echo "" +echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json new file mode 100644 index 000000000..e8da6b120 --- /dev/null +++ b/portal-db/api/openapi/openapi.json @@ -0,0 +1,1695 @@ +{ + "openapi": "3.0.0", + "info": { + "description": "", + "title": "standard public schema", + "version": "12.0.2 (a4e00ff)" + }, + "paths": { + "/": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "OpenAPI description (this document)", + "tags": [ + "Introspection" + ] + } + }, + "/service_fallbacks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + } + }, + "/portal_plans": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + } + }, + "/services": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + } + }, + "/networks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + } + }, + "/service_endpoints": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + } + } + }, + "externalDocs": { + "description": "PostgREST Documentation", + "url": "https://postgrest.org/en/v12.0/api.html" + }, + "servers": [ + { + "url": "http://localhost:3000" + } + ], + "components": { + "parameters": { + "preferParams": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "params=single-object" + ] + } + }, + "preferReturn": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none" + ] + } + }, + "preferCount": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "count=none" + ] + } + }, + "preferPost": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none", + "resolution=ignore-duplicates", + "resolution=merge-duplicates" + ] + } + }, + "select": { + "name": "select", + "description": "Filtering Columns", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "on_conflict": { + "name": "on_conflict", + "description": "On Conflict", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "order": { + "name": "order", + "description": "Ordering", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "range": { + "name": "Range", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string" + } + }, + "rangeUnit": { + "name": "Range-Unit", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string", + "default": "items" + } + }, + "offset": { + "name": "offset", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "limit": { + "name": "limit", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "rowFilter.service_fallbacks.service_fallback_id": { + "name": "service_fallback_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_fallbacks.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.fallback_url": { + "name": "fallback_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_fallbacks.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_plans.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.portal_plan_type_description": { + "name": "portal_plan_type_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.plan_usage_limit": { + "name": "plan_usage_limit", + "description": "Maximum usage allowed within the interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_usage_limit_interval": { + "name": "plan_usage_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_plans.plan_rate_limit_rps": { + "name": "plan_rate_limit_rps", + "description": "Rate limit in requests per second", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_application_limit": { + "name": "plan_application_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.services.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.service_name": { + "name": "service_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.compute_units_per_relay": { + "name": "compute_units_per_relay", + "description": "Cost in compute units for each relay", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.services.service_domains": { + "name": "service_domains", + "description": "Valid domains for this service", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.services.service_owner_address": { + "name": "service_owner_address", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.active": { + "name": "active", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.quality_fallback_enabled": { + "name": "quality_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.hard_fallback_enabled": { + "name": "hard_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.svg_icon": { + "name": "svg_icon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" + } + }, + "rowFilter.services.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.networks.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_endpoints.endpoint_id": { + "name": "endpoint_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_endpoints.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_endpoints.endpoint_type": { + "name": "endpoint_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.endpoint_type" + } + }, + "rowFilter.service_endpoints.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_endpoints.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + } + }, + "requestBodies": { + "networks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/networks" + } + } + }, + "description": "networks" + }, + "service_endpoints": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + } + }, + "description": "service_endpoints" + }, + "service_fallbacks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + } + }, + "description": "service_fallbacks" + }, + "portal_plans": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + } + }, + "description": "portal_plans" + }, + "services": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/services" + } + } + }, + "description": "services" + } + }, + "schemas": { + "service_fallbacks": { + "description": "Fallback URLs for services when primary endpoints fail", + "required": [ + "service_fallback_id", + "service_id", + "fallback_url" + ], + "properties": { + "service_fallback_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "fallback_url": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_plans": { + "description": "Available subscription plans for Portal Accounts", + "required": [ + "portal_plan_type" + ], + "properties": { + "portal_plan_type": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_plan_type_description": { + "format": "character varying", + "maxLength": 420, + "type": "string" + }, + "plan_usage_limit": { + "description": "Maximum usage allowed within the interval", + "format": "integer", + "type": "integer" + }, + "plan_usage_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "plan_rate_limit_rps": { + "description": "Rate limit in requests per second", + "format": "integer", + "type": "integer" + }, + "plan_application_limit": { + "format": "integer", + "type": "integer" + } + }, + "type": "object" + }, + "services": { + "description": "Supported blockchain services from the Pocket Network", + "required": [ + "service_id", + "service_name", + "service_domains" + ], + "properties": { + "service_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "service_name": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "compute_units_per_relay": { + "description": "Cost in compute units for each relay", + "format": "integer", + "type": "integer" + }, + "service_domains": { + "description": "Valid domains for this service", + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "service_owner_address": { + "description": "Note:\nThis is a Foreign Key to `gateways.gateway_address`.", + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "network_id": { + "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "active": { + "default": false, + + "type": "boolean" + }, + "quality_fallback_enabled": { + "default": false, + + "type": "boolean" + }, + "hard_fallback_enabled": { + "default": false, + + "type": "boolean" + }, + "svg_icon": { + "format": "text", + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "networks": { + "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "required": [ + "network_id" + ], + "properties": { + "network_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + } + }, + "type": "object" + }, + "service_endpoints": { + "description": "Available endpoint types for each service", + "required": [ + "endpoint_id", + "service_id" + ], + "properties": { + "endpoint_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "endpoint_type": { + "enum": [ + "cometBFT", + "cosmos", + "REST", + "JSON-RPC", + "WSS", + "gRPC" + ], + "format": "public.endpoint_type", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + } + } + } +} \ No newline at end of file diff --git a/portal-db/api/postgrest/init.sql b/portal-db/api/postgrest/init.sql new file mode 100644 index 000000000..5e9d5fe11 --- /dev/null +++ b/portal-db/api/postgrest/init.sql @@ -0,0 +1,274 @@ +-- ============================================================================ +-- PostgREST API Setup for Portal DB +-- ============================================================================ +-- This file sets up the necessary roles and permissions for PostgREST API access +-- Run this after the main schema (001_schema.sql) has been loaded + +-- ============================================================================ +-- CREATE API ROLES +-- ============================================================================ + +-- Anonymous role - for public API access (read-only by default) +DROP ROLE IF EXISTS web_anon; +CREATE ROLE web_anon NOLOGIN; + +-- Authenticated role - for authenticated API access +DROP ROLE IF EXISTS web_user; +CREATE ROLE web_user NOLOGIN; + +-- Admin role - for administrative API access +DROP ROLE IF EXISTS web_admin; +CREATE ROLE web_admin NOLOGIN; + +-- ============================================================================ +-- GRANT BASIC PERMISSIONS +-- ============================================================================ + +-- Grant usage on schema +GRANT USAGE ON SCHEMA public TO web_anon, web_user, web_admin; + +-- Grant sequence usage for auto-incrementing IDs +GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO web_user, web_admin; + +-- ============================================================================ +-- READ-ONLY PERMISSIONS (web_anon) +-- ============================================================================ + +-- Grant SELECT on most tables for anonymous users (public data) +GRANT SELECT ON TABLE + networks, + services, + service_endpoints, + service_fallbacks, + portal_plans +TO web_anon; + +-- ============================================================================ +-- AUTHENTICATED USER PERMISSIONS (web_user) +-- ============================================================================ + +-- Inherit anonymous permissions +GRANT web_anon TO web_user; + +-- Read access to more tables for authenticated users +GRANT SELECT ON TABLE + organizations, + portal_accounts, + portal_applications, + applications, + gateways +TO web_user; + +-- Limited write access for user-owned resources +-- Users can only modify their own data (enforced by RLS policies) +GRANT INSERT, UPDATE ON TABLE + portal_users, + contacts, + portal_accounts, + portal_applications, + portal_application_allowlists +TO web_user; + +-- ============================================================================ +-- ADMIN PERMISSIONS (web_admin) +-- ============================================================================ + +-- Inherit user permissions +GRANT web_user TO web_admin; + +-- Full access to all tables for admin users +GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO web_admin; + +-- ============================================================================ +-- ROW LEVEL SECURITY (RLS) POLICIES +-- ============================================================================ + +-- Enable RLS on sensitive tables +ALTER TABLE portal_users ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_accounts ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_applications ENABLE ROW LEVEL SECURITY; +ALTER TABLE contacts ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_account_rbac ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_application_rbac ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_application_allowlists ENABLE ROW LEVEL SECURITY; + +-- ============================================================================ +-- RLS POLICIES FOR PORTAL_USERS +-- ============================================================================ + +-- Users can view their own profile +CREATE POLICY "Users can view own profile" ON portal_users + FOR SELECT + USING (portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'); + +-- Users can update their own profile +CREATE POLICY "Users can update own profile" ON portal_users + FOR UPDATE + USING (portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'); + +-- Admins can view all users +CREATE POLICY "Admins can view all users" ON portal_users + FOR ALL + TO web_admin + USING (true); + +-- ============================================================================ +-- RLS POLICIES FOR PORTAL_ACCOUNTS +-- ============================================================================ + +-- Users can view accounts they have access to +CREATE POLICY "Users can view accessible accounts" ON portal_accounts + FOR SELECT + USING ( + portal_account_id IN ( + SELECT pa.portal_account_id + FROM portal_account_rbac pa + JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + ) + ); + +-- Account owners can update their accounts +CREATE POLICY "Account owners can update accounts" ON portal_accounts + FOR UPDATE + USING ( + portal_account_id IN ( + SELECT pa.portal_account_id + FROM portal_account_rbac pa + JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + AND pa.role_name = 'owner' + ) + ); + +-- ============================================================================ +-- RLS POLICIES FOR PORTAL_APPLICATIONS +-- ============================================================================ + +-- Users can view applications they have access to +CREATE POLICY "Users can view accessible applications" ON portal_applications + FOR SELECT + USING ( + portal_account_id IN ( + SELECT pa.portal_account_id + FROM portal_account_rbac pa + JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + ) + ); + +-- Users can create applications in accounts they have access to +CREATE POLICY "Users can create applications in accessible accounts" ON portal_applications + FOR INSERT + WITH CHECK ( + portal_account_id IN ( + SELECT pa.portal_account_id + FROM portal_account_rbac pa + JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + ) + ); + +-- Users can update applications they have access to +CREATE POLICY "Users can update accessible applications" ON portal_applications + FOR UPDATE + USING ( + portal_account_id IN ( + SELECT pa.portal_account_id + FROM portal_account_rbac pa + JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + ) + ); + +-- ============================================================================ +-- API HELPER FUNCTIONS +-- ============================================================================ + +-- Function to get current user info +CREATE OR REPLACE FUNCTION api.current_user_info() +RETURNS TABLE ( + user_id INTEGER, + email VARCHAR(255), + is_admin BOOLEAN +) +LANGUAGE sql STABLE SECURITY DEFINER +AS $$ + SELECT + pu.portal_user_id, + pu.portal_user_email, + pu.portal_admin + FROM portal_users pu + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'; +$$; + +-- Function to get user's accessible accounts +CREATE OR REPLACE FUNCTION api.user_accounts() +RETURNS TABLE ( + account_id UUID, + account_name VARCHAR(42), + role_name VARCHAR(20), + plan_type VARCHAR(42) +) +LANGUAGE sql STABLE SECURITY DEFINER +AS $$ + SELECT + pa.portal_account_id, + pa.user_account_name, + par.role_name, + pa.portal_plan_type + FROM portal_accounts pa + JOIN portal_account_rbac par ON pa.portal_account_id = par.portal_account_id + JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'; +$$; + +-- Function to get user's accessible applications +CREATE OR REPLACE FUNCTION api.user_applications() +RETURNS TABLE ( + application_id UUID, + application_name VARCHAR(42), + account_id UUID, + account_name VARCHAR(42) +) +LANGUAGE sql STABLE SECURITY DEFINER +AS $$ + SELECT + pa.portal_application_id, + pa.portal_application_name, + pac.portal_account_id, + pac.user_account_name + FROM portal_applications pa + JOIN portal_accounts pac ON pa.portal_account_id = pac.portal_account_id + JOIN portal_account_rbac par ON pac.portal_account_id = par.portal_account_id + JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id + WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' + AND pa.deleted_at IS NULL; +$$; + +-- ============================================================================ +-- CREATE API SCHEMA FOR FUNCTIONS +-- ============================================================================ + +CREATE SCHEMA IF NOT EXISTS api; +GRANT USAGE ON SCHEMA api TO web_anon, web_user, web_admin; +GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA api TO web_anon, web_user, web_admin; + +-- ============================================================================ +-- GRANTS FOR API SCHEMA +-- ============================================================================ + +-- Ensure the authenticator role can switch to our API roles +-- Note: This will be handled by your JWT authentication setup +GRANT web_anon TO current_user; +GRANT web_user TO current_user; +GRANT web_admin TO current_user; + +-- ============================================================================ +-- COMMENTS +-- ============================================================================ + +COMMENT ON ROLE web_anon IS 'Anonymous role for public API access (read-only)'; +COMMENT ON ROLE web_user IS 'Authenticated role for standard API access'; +COMMENT ON ROLE web_admin IS 'Administrative role for full API access'; +COMMENT ON SCHEMA api IS 'API functions and procedures for PostgREST'; diff --git a/portal-db/api/postgrest/postgrest.conf b/portal-db/api/postgrest/postgrest.conf new file mode 100644 index 000000000..555baea38 --- /dev/null +++ b/portal-db/api/postgrest/postgrest.conf @@ -0,0 +1,33 @@ +# PostgREST Configuration for Portal DB +# Documentation: https://postgrest.org/en/stable/configuration.html + +# Database connection +db-uri = "postgresql://portal_user:portal_password@localhost:5435/portal_db" +db-schemas = "public" +db-anon-role = "web_anon" +db-pool = 10 + +# Server settings +server-host = "0.0.0.0" +server-port = 3000 + +# JWT Settings (optional - for authentication) +# jwt-secret = "your-jwt-secret-here" +# jwt-aud = "your-audience" + +# API settings +openapi-mode = "follow-privileges" +openapi-server-proxy-uri = "http://localhost:3000" + +# CORS settings +server-cors-allowed-origins = "*" + +# Logging +log-level = "info" + +# Rate limiting (optional) +# server-max-rows = 1000 +# server-pre-request = "public.check_rate_limit" + +# Schema cache +db-schema-cache-size = 100 diff --git a/portal-db/api/scripts/generate-sdks.sh b/portal-db/api/scripts/generate-sdks.sh new file mode 100644 index 000000000..1e6973a68 --- /dev/null +++ b/portal-db/api/scripts/generate-sdks.sh @@ -0,0 +1,239 @@ +#!/bin/bash + +# Generate Go SDK from OpenAPI specification using oapi-codegen +# This script generates a Go client SDK for the Portal DB API + +set -e + +# Configuration +OPENAPI_DIR="../openapi" +OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" +OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" +GO_OUTPUT_DIR="../../sdk/go" +CONFIG_MODELS="./codegen-models.yaml" +CONFIG_CLIENT="./codegen-client.yaml" +POSTGREST_URL="http://localhost:3000" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification using oapi-codegen..." + +# ============================================================================ +# PHASE 1: ENVIRONMENT VALIDATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 1: Environment Validation${NC}" + +# Check if Go is installed +if ! command -v go >/dev/null 2>&1; then + echo -e "${RED}โŒ Go is not installed. Please install Go first.${NC}" + echo " - Mac: brew install go" + echo " - Or download from: https://golang.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Go is installed: $(go version)${NC}" + +# Check if oapi-codegen is installed +if ! command -v oapi-codegen >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing oapi-codegen..." + go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest + + # Verify installation + if ! command -v oapi-codegen >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install oapi-codegen. Please check your Go installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" + +# Check if PostgREST is running +echo "๐ŸŒ Checking PostgREST availability..." +if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then + echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" + echo " Please ensure PostgREST is running:" + echo " cd .. && docker compose up -d" + echo " cd api && docker compose up -d" + exit 1 +fi + +echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" + +# Check if configuration files exist +for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do + if [ ! -f "$config_file" ]; then + echo -e "${RED}โŒ Configuration file not found: $config_file${NC}" + echo " This should have been created as a permanent file." + exit 1 + fi +done + +echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" + +# ============================================================================ +# PHASE 2: SPEC RETRIEVAL & CONVERSION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" + +# Create openapi directory if it doesn't exist +mkdir -p "$OPENAPI_DIR" + +# Clean any existing files to start fresh +echo "๐Ÿงน Cleaning previous OpenAPI files..." +rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" + +# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) +echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." +if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" > "$OPENAPI_V2_FILE"; then + echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" + exit 1 +fi + +# Verify the file was created and has content +if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then + echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" + +# Convert Swagger 2.0 to OpenAPI 3.x +echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." + +# Check if swagger2openapi is available +if ! command -v swagger2openapi >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing swagger2openapi converter..." + if command -v npm >/dev/null 2>&1; then + npm install -g swagger2openapi + else + echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 + fi +fi + +if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" + exit 1 +fi + +# Fix boolean format issues in the converted spec (in place) +echo "๐Ÿ”ง Fixing boolean format issues..." +sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" +rm -f "${OPENAPI_V3_FILE}.bak" + +# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version +echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." +rm -f "$OPENAPI_V2_FILE" + +echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" +echo -e "${BLUE}๐Ÿ“„ Final OpenAPI directory contents:${NC}" +echo " โ€ข openapi.json - OpenAPI 3.x specification (the only remaining file)" + +# ============================================================================ +# PHASE 3: SDK GENERATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 3: SDK Generation${NC}" + +echo "๐Ÿน Generating Go SDK in separate files for better readability..." + +# Clean previous generated files +echo "๐Ÿงน Cleaning previous generated files..." +rm -f "$GO_OUTPUT_DIR/models.go" "$GO_OUTPUT_DIR/client.go" + +# Generate models file (data types and structures) +echo " Generating models.go..." +if ! oapi-codegen -config "$CONFIG_MODELS" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate models${NC}" + exit 1 +fi + +# Generate client file (API client and methods) +echo " Generating client.go..." +if ! oapi-codegen -config "$CONFIG_CLIENT" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate client${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" + +# ============================================================================ +# PHASE 4: MODULE SETUP +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 4: Module Setup${NC}" + +# Navigate to SDK directory for module setup +cd "$GO_OUTPUT_DIR" + +# Run go mod tidy to resolve dependencies +echo "๐Ÿ”ง Resolving dependencies..." +if ! go mod tidy; then + echo -e "${RED}โŒ Failed to resolve Go dependencies${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Go dependencies resolved${NC}" + +# Test compilation +echo "๐Ÿ” Validating generated code compilation..." +if ! go build ./...; then + echo -e "${RED}โŒ Generated code does not compile${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" + +# Return to scripts directory +cd - >/dev/null + +# ============================================================================ +# SUCCESS SUMMARY +# ============================================================================ + +echo "" +echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" +echo "" +echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" +echo " API Docs: $OPENAPI_V3_FILE" +echo " SDK: $GO_OUTPUT_DIR" +echo " Module: github.com/grove/path/portal-db/sdk/go" +echo " Package: portaldb" +echo "" +echo -e "${BLUE}๐Ÿ“š SDK Files:${NC}" +echo " โ€ข models.go - Generated data models and types (updated)" +echo " โ€ข client.go - Generated SDK client and methods (updated)" +echo " โ€ข go.mod - Go module definition (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" +echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" +echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" +echo "" +echo -e "${BLUE}๐Ÿš€ Next steps:${NC}" +echo " 1. Review the generated models: cat $GO_OUTPUT_DIR/models.go | head -50" +echo " 2. Review the generated client: cat $GO_OUTPUT_DIR/client.go | head -50" +echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" +echo " 4. Check the README: cat $GO_OUTPUT_DIR/README.md" +echo "" +echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" +echo " โ€ข Generated files: models.go (data types), client.go (API methods)" +echo " โ€ข Permanent files: go.mod, README.md" +echo " โ€ข Better readability: types separated from client logic" +echo " โ€ข Run this script after database schema changes" +echo "" +echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index f49e3a7f0..3e054fa6d 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -1,6 +1,6 @@ services: postgres: - image: postgres:15 + image: postgres:17 container_name: path-portal-db environment: POSTGRES_DB: portal_db @@ -10,12 +10,45 @@ services: - "5435:5432" volumes: - portal_db_data:/var/lib/postgresql/data - - ./init:/docker-entrypoint-initdb.d + - ./schema:/docker-entrypoint-initdb.d healthcheck: test: ["CMD", "pg_isready", "-U", "portal_user", "-d", "portal_db"] interval: 10s timeout: 5s retries: 5 + # PostgREST API Server + postgrest: + image: postgrest/postgrest:v12.0.2 + container_name: portal-db-api + ports: + - "3000:3000" + environment: + # PostgREST will read the config file + PGRST_DB_URI: postgresql://portal_user:portal_password@postgres:5432/portal_db + PGRST_DB_SCHEMAS: public,api + PGRST_DB_ANON_ROLE: web_anon + PGRST_DB_POOL: 10 + PGRST_SERVER_HOST: 0.0.0.0 + PGRST_SERVER_PORT: 3000 + PGRST_OPENAPI_MODE: follow-privileges + PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:3000 + PGRST_SERVER_CORS_ALLOWED_ORIGINS: "*" + PGRST_SERVER_CORS_ALLOWED_HEADERS: "accept, authorization, content-type, x-requested-with, range" + PGRST_SERVER_CORS_EXPOSED_HEADERS: "content-range, content-profile" + PGRST_LOG_LEVEL: info + volumes: + - ./api/postgrest/postgrest.conf:/etc/postgrest/postgrest.conf:ro + depends_on: + postgres: + condition: service_healthy + command: ["postgrest", "/etc/postgrest/postgrest.conf"] + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"] + interval: 30s + timeout: 10s + retries: 3 + volumes: portal_db_data: \ No newline at end of file diff --git a/portal-db/init/001_schema.sql b/portal-db/schema/001_schema.sql similarity index 100% rename from portal-db/init/001_schema.sql rename to portal-db/schema/001_schema.sql diff --git a/portal-db/sdk/go/README.md b/portal-db/sdk/go/README.md new file mode 100644 index 000000000..a312eaa01 --- /dev/null +++ b/portal-db/sdk/go/README.md @@ -0,0 +1,236 @@ +# Portal DB Go SDK + +This Go SDK provides a type-safe client for the Portal DB API, generated using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen). + +## Installation + +```bash +go get github.com/grove/path/portal-db/sdk/go +``` + +## Quick Start + +```go +package main + +import ( + "context" + "fmt" + "log" + + "github.com/grove/path/portal-db/sdk/go" +) + +func main() { + // Create a new client with typed responses + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + log.Fatal(err) + } + + ctx := context.Background() + + // Example: Get all services with typed response + resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{}) + if err != nil { + log.Fatal(err) + } + + // Check response status and access typed data + switch resp.StatusCode() { + case 200: + if resp.JSON200 != nil { + services := *resp.JSON200 // []portaldb.Services + fmt.Printf("Found %d services\n", len(services)) + + for _, service := range services { + fmt.Printf("- Service: %s (ID: %s)\n", service.ServiceName, service.ServiceId) + if service.Active != nil && *service.Active { + fmt.Printf(" Status: Active\n") + } + if service.ComputeUnitsPerRelay != nil { + fmt.Printf(" Compute Units: %d\n", *service.ComputeUnitsPerRelay) + } + fmt.Printf(" Domains: %v\n", service.ServiceDomains) + } + } + case 401: + fmt.Println("Authentication required") + default: + fmt.Printf("Unexpected status: %d\n", resp.StatusCode()) + } +} +``` + +## Authentication + +For authenticated endpoints, add your JWT token to requests: + +```go +import ( + "context" + "net/http" + + "github.com/grove/path/portal-db/sdk/go" +) + +func authenticatedExample() { + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + log.Fatal(err) + } + + // Add JWT token to requests + token := "your-jwt-token-here" + ctx := context.Background() + + // Use RequestEditorFn to add authentication header + requestEditor := func(ctx context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil + } + + // Make authenticated request with typed response + resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{}, requestEditor) + if err != nil { + log.Fatal(err) + } + + if resp.StatusCode() == 200 && resp.JSON200 != nil { + fmt.Printf("Authenticated: Found %d services\n", len(*resp.JSON200)) + } else { + fmt.Printf("Authentication failed: %d\n", resp.StatusCode()) + } +} +``` + +## Available Endpoints + +Based on your PostgREST schema, the SDK includes methods for: + +- **Services** (`/services`) - Blockchain services from Pocket Network + - `GetServicesWithResponse(ctx, params)` - List all services โ†’ `*[]Services` + - `PostServicesWithResponse(ctx, params, body)` - Create a new service + - `PatchServicesWithResponse(ctx, params, body)` - Update services + - `DeleteServicesWithResponse(ctx, params)` - Delete services + +- **Networks** (`/networks`) - Supported blockchain networks + - `GetNetworksWithResponse(ctx, params)` - List all networks โ†’ `*[]Networks` + - `PostNetworksWithResponse(ctx, params, body)` - Create a new network + - `PatchNetworksWithResponse(ctx, params, body)` - Update networks + - `DeleteNetworksWithResponse(ctx, params)` - Delete networks + +- **Portal Plans** (`/portal_plans`) - Subscription plans + - `GetPortalPlansWithResponse(ctx, params)` - List all plans โ†’ `*[]PortalPlans` + - `PostPortalPlansWithResponse(ctx, params, body)` - Create a new plan + - `PatchPortalPlansWithResponse(ctx, params, body)` - Update plans + - `DeletePortalPlansWithResponse(ctx, params)` - Delete plans + +- **Service Endpoints** (`/service_endpoints`) - Endpoint types for services + - `GetServiceEndpointsWithResponse(ctx, params)` - List all endpoints โ†’ `*[]ServiceEndpoints` + - `PostServiceEndpointsWithResponse(ctx, params, body)` - Create a new endpoint + - `PatchServiceEndpointsWithResponse(ctx, params, body)` - Update endpoints + - `DeleteServiceEndpointsWithResponse(ctx, params)` - Delete endpoints + +- **Service Fallbacks** (`/service_fallbacks`) - Fallback URLs for services + - `GetServiceFallbacksWithResponse(ctx, params)` - List all fallbacks โ†’ `*[]ServiceFallbacks` + - `PostServiceFallbacksWithResponse(ctx, params, body)` - Create a new fallback + - `PatchServiceFallbacksWithResponse(ctx, params, body)` - Update fallbacks + - `DeleteServiceFallbacksWithResponse(ctx, params)` - Delete fallbacks + +## Error Handling + +```go +resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{}) +if err != nil { + // Handle network/client errors + log.Printf("Client error: %v", err) + return +} + +switch resp.StatusCode() { +case 200: + // Success - access typed data + if resp.JSON200 != nil { + services := *resp.JSON200 // []portaldb.Services + fmt.Printf("Found %d services\n", len(services)) + for _, service := range services { + fmt.Printf("Service: %s\n", service.ServiceName) + } + } +case 404: + // Not found + fmt.Println("Resource not found") +case 401: + // Unauthorized + fmt.Println("Authentication required") +default: + // Other status codes + fmt.Printf("Unexpected status: %d\n", resp.StatusCode()) +} +``` + +## Configuration + +You can customize the client behavior: + +```go +import ( + "net/http" + "time" +) + +// Custom HTTP client with timeout +httpClient := &http.Client{ + Timeout: 30 * time.Second, +} + +client, err := portaldb.NewClientWithResponses( + "http://localhost:3000", + portaldb.WithHTTPClient(httpClient), +) +``` + +## Development + +This SDK was generated from the OpenAPI specification served by PostgREST. To regenerate: + +```bash +# From the portal-db/api directory +make generate-sdks + +# Or directly run the script +cd api/scripts +./generate-sdks.sh +``` + +## Generated Files + +- `models.go` - Generated data models and type definitions (44KB) +- `client.go` - Generated API client methods and HTTP logic (189KB) +- `go.mod` - Go module definition +- `README.md` - This documentation + +### File Organization + +For better readability, the SDK is split into two main files: +- **`models.go`** - Contains all data structures, constants, and type definitions +- **`client.go`** - Contains the HTTP client, request builders, and API methods + +This separation makes it easier to: +- Browse and understand the data models separately from client logic +- Navigate large codebases more efficiently +- Maintain and review changes to specific parts of the SDK + +## Support + +For issues with the generated SDK, please check: +1. [API README](../../api/README.md) - PostgREST API documentation +2. [oapi-codegen documentation](https://github.com/oapi-codegen/oapi-codegen) - SDK generation tool +3. Your database schema and PostgREST configuration + +## Related Documentation + +- **API Documentation**: [../../api/README.md](../../api/README.md) +- **OpenAPI Specification**: `../../api/openapi/openapi.json` +- **Database Schema**: `../../schema/001_schema.sql` diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go new file mode 100644 index 000000000..3f84eefb0 --- /dev/null +++ b/portal-db/sdk/go/client.go @@ -0,0 +1,5761 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/oapi-codegen/runtime" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // Get request + Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteNetworks request + DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNetworks request + GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchNetworksWithBody request with any body + PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostNetworksWithBody request with any body + PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalPlans request + DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalPlans request + GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalPlansWithBody request with any body + PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalPlansWithBody request with any body + PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceEndpoints request + DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceEndpoints request + GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceEndpointsWithBody request with any body + PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceEndpointsWithBody request with any body + PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceFallbacks request + DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceFallbacks request + GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceFallbacksWithBody request with any body + PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceFallbacksWithBody request with any body + PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServices request + DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServices request + GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServicesWithBody request with any body + PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServicesWithBody request with any body + PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetRequest generates requests for Get +func NewGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteNetworksRequest generates requests for DeleteNetworks +func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetNetworksRequest generates requests for GetNetworks +func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body +func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body +func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body +func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body +func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalPlansRequest generates requests for DeletePortalPlans +func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalPlansRequest generates requests for GetPortalPlans +func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body +func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body +func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body +func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body +func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints +func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints +func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body +func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body +func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body +func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body +func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks +func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks +func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body +func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body +func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body +func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body +func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServicesRequest generates requests for DeleteServices +func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServicesRequest generates requests for GetServices +func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServicesRequest calls the generic PatchServices builder with application/json body +func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body +func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServicesRequest calls the generic PostServices builder with application/json body +func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServicesRequestWithBody generates requests for PostServices with any type of body +func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) + + // DeleteNetworksWithResponse request + DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) + + // GetNetworksWithResponse request + GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) + + // PatchNetworksWithBodyWithResponse request with any body + PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + // PostNetworksWithBodyWithResponse request with any body + PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + // DeletePortalPlansWithResponse request + DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) + + // GetPortalPlansWithResponse request + GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) + + // PatchPortalPlansWithBodyWithResponse request with any body + PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + // PostPortalPlansWithBodyWithResponse request with any body + PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + // DeleteServiceEndpointsWithResponse request + DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) + + // GetServiceEndpointsWithResponse request + GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) + + // PatchServiceEndpointsWithBodyWithResponse request with any body + PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + // PostServiceEndpointsWithBodyWithResponse request with any body + PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + // DeleteServiceFallbacksWithResponse request + DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) + + // GetServiceFallbacksWithResponse request + GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) + + // PatchServiceFallbacksWithBodyWithResponse request with any body + PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + // PostServiceFallbacksWithBodyWithResponse request with any body + PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + // DeleteServicesWithResponse request + DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) + + // GetServicesWithResponse request + GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) + + // PatchServicesWithBodyWithResponse request with any body + PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + // PostServicesWithBodyWithResponse request with any body + PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) +} + +type GetResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Networks + ApplicationvndPgrstObjectJSON200 *[]Networks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks +} + +// Status returns HTTPResponse.Status +func (r GetNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans +} + +// Status returns HTTPResponse.Status +func (r GetPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints +} + +// Status returns HTTPResponse.Status +func (r GetServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks +} + +// Status returns HTTPResponse.Status +func (r GetServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Services + ApplicationvndPgrstObjectJSON200 *[]Services + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services +} + +// Status returns HTTPResponse.Status +func (r GetServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetResponse(rsp) +} + +// DeleteNetworksWithResponse request returning *DeleteNetworksResponse +func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { + rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteNetworksResponse(rsp) +} + +// GetNetworksWithResponse request returning *GetNetworksResponse +func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { + rsp, err := c.GetNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworksResponse(rsp) +} + +// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse +func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse +func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse +func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { + rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalPlansResponse(rsp) +} + +// GetPortalPlansWithResponse request returning *GetPortalPlansResponse +func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { + rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalPlansResponse(rsp) +} + +// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse +func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse +func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse +func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { + rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceEndpointsResponse(rsp) +} + +// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse +func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { + rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceEndpointsResponse(rsp) +} + +// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse +func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse +func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse +func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { + rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceFallbacksResponse(rsp) +} + +// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse +func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { + rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceFallbacksResponse(rsp) +} + +// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse +func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse +func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +// DeleteServicesWithResponse request returning *DeleteServicesResponse +func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { + rsp, err := c.DeleteServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServicesResponse(rsp) +} + +// GetServicesWithResponse request returning *GetServicesResponse +func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { + rsp, err := c.GetServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServicesResponse(rsp) +} + +// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse +func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse +func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +// ParseGetResponse parses an HTTP response from a GetWithResponse call +func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call +func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call +func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call +func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call +func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call +func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call +func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call +func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call +func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call +func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call +func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call +func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call +func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call +func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call +func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call +func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call +func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call +func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call +func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call +func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call +func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/+w8bW/bONJ/heDzAG1xqu2m7QLnQz900/bQ27ZrJO3dh27gZaSxzY1EqiSV1LfIfz+Q", + "kqw3SpYl2U4X/hLI4nBmNG+c4ZD5E7s8CDkDpiSe/olDIkgACoT55dOAKv3ggXQFDRXlDE/xB/2asiUi", + "zEMzsqSMmBEHUz38LQKxxg5mJAA8TZA4WLorCIjGptahHpBKULbE9/cO5ouFhN6UEixbSAkPRJXSr/q1", + "hqlBbWY1Yw4FLECc84hZvmRmBoG5kFJYAYlxJiRiiAINYFGAp1+xq3G+YpwBvnJqKc+4HJqwABUJ9kpA", + "KEACU6n0k/cBZTQgfvbCsKh/Se5HGvYVXTIu4KkXhT51iQJZHA5ALAujDd93YWg8hC+0MikIW8LOJlxm", + "9cJgaTY0Q+kL6+CaVmpPDao8SQ8WJPIVnmKqINAqszDB795RX4EYMVB3XNzI9GFOPY3E5kY5iDy9BRcB", + "0eTcFRHEVSDQLRHr2B2bSIdcKOLPQ58wOdJ/5ySMTYlyNt+ELxsrNdBWtihTsDRy240ZQRTEeOcilFVt", + "XRAFyIwjypCAbxFIJVEIAklwOfNqopEN+aCMR5IsYV4T/j+S7zSIAmSAEPF9fgceuqNqRRlSK0Caqrg1", + "XlPLfZ7CvlifbxhpsgHrBCtLYXTtUzcmk4Nsz1/2Yx5PqmGrDLcHXymRmBdU3I6twpxBWJQgbqkLc2Be", + "yClTcuQKIAq8Oan14xyElQdFA5CKBKGxUKR/ov/Gy9RurKRPDeEtD9LDqBtoN5lNEajJgsuQuzGTvqmX", + "Qw5iT3YRhd4Wu8hB7MMuFsT3r4l78wBMNGMlfZpHojbmFWAG1U7GR/lNC1PJgw7gOlVeDm+tGQ/HtlY5", + "Iq6it7WRIxm1Ur7m3AfC2hLS5WSkYB4xquQ8BDEX4JN1NYs459JkPckEZCagBRcIiLtC8Sx7AlFHo7/d", + "HN+b5cgDH5o5yEHshYMVEV7mkMDItQ+13mMHHsKUDl9ObEh/i4hP1bq1EGrhh5BDGk88HhDKLGXEv4lP", + "PZQMGxdSKypRMq/GicpY2wnw69WuXB887makYzrNxM3P/ZDndwzEnHieACm38VEEHpih2+WcuvWJ/Wbc", + "Hk3gu2pL6cALnQQfXEuFGrNF2RKdcz8KjHXbhW/mN+226O+M6/KfuUfB6DHd8NDPLmcK4g2/3GbC+A8Z", + "iztD/P8CFniK/2+cbbiO41E53iDU5PJobpk3CpdCqhG//gNc9bd94v0Hi3xfvtKfHoZxrOtARpvL2JW3", + "nabfOyVNZmNOvv4cTvQFpAOLf3fcnVVQIbW7GkooKqoojju4UpQNppMq5oEV05FAZ+3Y6e2uIhueip4s", + "QE6lzBpeWRnmPSlrRwK9lVWk111ZeTy1ysoBbZQ1uI72pZoDaaSnIprkH6NOJpSX+OKMyyjUkRA8dO1z", + "98ZdEcpQCo4ez7h7AwrpnJqBcpACqcwDKHf0BDs4FDwEoYqpRJIlFyl94gqmv7HPOpenEhE0EzQgYo1+", + "gfXot2gyee6GN2PzoNOjxjwxIN8/AFuqFZ6+OLMmc/AtokJr5WueqazTFSvStg4XuX59S6ivix8ko+vN", + "ADLQpjaZmenotWu6mrIikvo2Tn1Nn77Q3A3VeGlPbbBuSSeShS5H2tb0zHZIwJlaYQevgQityh07GQ62", + "dSyOZaQO3ta0aI98ss0FKh9ucwRrBlTnDSkQ0mhyG11ZlV50g+JGVNaRPf9ycfH20+f55/cf315+fv1x", + "lpdq++rJwaV+xjBqbTLcShMjO94QgPr53WfsYJfLgOuYcPH2Uv/+1+Wvn55ezM6xg/9zeYkdvNQ/LKa8", + "paXh4OJ+xJavfccF0CXTX4sUR79bdjV+T8SwuEFKK/jVoxToEXJN1bl5M6feo4FcoFhgD24VJS8o9bMy", + "CTZ5QyHFLNXlyRD6cvEhdoFUZuhuBQyFiZFtHAotCPUP7xrlPkpblZ29fNlgeaVuyP4d7mTyu5t8TT8q", + "v1VZsI4GT2ibPG58YCF4YFKCJIn8FOdhFfvPmjkbaSyIL2HDSrrBfO/gofsxrQxv7w5a7JF0QlHb5Ngu", + "052S9rJfWU5LVf0qBcr8KoMeyq+aehzbZdC/KbGlyRCfPKvuyG6YIUKQ9c5hbo/pabnt0BbZs5/+3oCt", + "0kXY0d6WRMEdWctR8pCiqhpdCpkZXWlKB8t7ObF9Wq4fsaXNcKzwX4j6aY+oZPLV0K+xwXcFghH/DXct", + "6ppxqZY6t0VvuBsFuQOnJtXAK6VCOR2PQw0nQKoRF8sxsPHts7PRZExCOlqpwNeCoWzBjX9Q5cdfRJhH", + "hIfijBglmyMOvgUhY+oax+gMPSYvYDJZLJ5oNDwERkKKp/j5aDKa6MWGqJVhfaz/LONz2Xr9May+9/AU", + "/9McsxYgQ85kvCidTSaWU9W/xBsrUaCdTr8Igb2evUc5MPTYBAYvkccTrSOylFob75kSXIbgGnRXGtW4", + "uDOjl4Eqe2/M+08ppFM41v7VvluUgYybj7beO1sRFM4r319VJPXC5sfoPNnqK0qs735TKsuN3K7unVql", + "Hk9kSSuuBWR8FL8FYHwguy2gOQTdhnx8yaAFZLwh1Npc4osDFmuZ7LQPvFk327Xcysvp7hvEByDYuHPc", + "n759S7kv3spesw6GDj6b/GRZFohQlPiHDAEhUe6qGgRm+vWDipxp831dp4tCf76gkYcWdsPkhk5J5Fx2", + "D7zt42buktDQgn1mKSfjEnD/UtU5QbUj0ZQXxA2ImQHubuDNJ/vbrDodTub3QFtuVAyHKusg9MRZ6tr0", + "xFZtIR04c+vQCUvtu2DQTQnbyZZPtnxKqR9CSl0+HnWQtLo/0f6p9VYeeqTXW3APl2IPGaubMutTvD7F", + "6/3VPmV3eSDJS33Z08cdDlf5bBFr6+pnOJnqoqfm9ElT5XMZT3m7mdE9BDXfj93JfRpvmPbEVDwW0hNZ", + "rq3ZE1OuqXG0omT7gaTU+KqW1lSSnIzshzSyU7VwyGrBekj/ICXDQJT71w3tGOlRPLQhsI8Kom9gbaof", + "TsH1r7KC75iDWo35QeQB9dl9b2M9XIrfRrwd8vx+ss1n+aVTtS2y/HebGf1jRPO/9ujkStb/0NETU+Fk", + "Zk9cfUOF9b9/HDjZ73zeumyVmfW1yPxPhvdDGt6pADhGAVC4+HnQAqAn5eEKgGZGBigAmggMVwDsKdi2", + "qAZOAfevstJ3zFoLBv7w8oWtFUJ3Az58hdAk69YVwl4EnSsX2lcJA8SM3n5d+o9N3VDUXXTqx1B61r8f", + "luIdjm64djtHWf8vALtNrr0s1A2d/fJVRyGnt0m6Tc9dJetoeP2Wj2PWh12vI5aiUKuq8BRoToHmFGh+", + "oEBz2g84wn7AwbcBjl3976voP8KNnK4LZ4sK/7R4nhbP0+L5Y2fp3fYb9nKPrXOk2raR8wNs4Ax/f62b", + "NO+T//GQyim7/z8dj33uEn/FpZo+n0wm+P7q/n8BAAD//wIgH/upbQAA", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %w", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + res := make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + resolvePath := PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + pathToFile := url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/portal-db/sdk/go/go.mod b/portal-db/sdk/go/go.mod new file mode 100644 index 000000000..e649ced68 --- /dev/null +++ b/portal-db/sdk/go/go.mod @@ -0,0 +1,25 @@ +module github.com/grove/path/portal-db/sdk/go + +go 1.22.5 + +toolchain go1.24.3 + +require ( + github.com/getkin/kin-openapi v0.133.0 + github.com/oapi-codegen/runtime v1.1.1 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/woodsbury/decimal128 v1.3.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/portal-db/sdk/go/go.sum b/portal-db/sdk/go/go.sum new file mode 100644 index 000000000..65805ac2a --- /dev/null +++ b/portal-db/sdk/go/go.sum @@ -0,0 +1,54 @@ +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= +github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= +github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go new file mode 100644 index 000000000..c39df7d06 --- /dev/null +++ b/portal-db/sdk/go/models.go @@ -0,0 +1,893 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +// Defines values for PortalPlansPlanUsageLimitInterval. +const ( + Day PortalPlansPlanUsageLimitInterval = "day" + Month PortalPlansPlanUsageLimitInterval = "month" + Year PortalPlansPlanUsageLimitInterval = "year" +) + +// Defines values for ServiceEndpointsEndpointType. +const ( + CometBFT ServiceEndpointsEndpointType = "cometBFT" + Cosmos ServiceEndpointsEndpointType = "cosmos" + GRPC ServiceEndpointsEndpointType = "gRPC" + JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" + REST ServiceEndpointsEndpointType = "REST" + WSS ServiceEndpointsEndpointType = "WSS" +) + +// Defines values for PreferCount. +const ( + PreferCountCountNone PreferCount = "count=none" +) + +// Defines values for PreferPost. +const ( + PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" + PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" + PreferPostReturnMinimal PreferPost = "return=minimal" + PreferPostReturnNone PreferPost = "return=none" + PreferPostReturnRepresentation PreferPost = "return=representation" +) + +// Defines values for PreferReturn. +const ( + PreferReturnReturnMinimal PreferReturn = "return=minimal" + PreferReturnReturnNone PreferReturn = "return=none" + PreferReturnReturnRepresentation PreferReturn = "return=representation" +) + +// Defines values for DeleteNetworksParamsPrefer. +const ( + DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" + DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" + DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" +) + +// Defines values for GetNetworksParamsPrefer. +const ( + GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" +) + +// Defines values for PatchNetworksParamsPrefer. +const ( + PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" + PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" + PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" +) + +// Defines values for PostNetworksParamsPrefer. +const ( + PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" + PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" + PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" + PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" + PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalPlansParamsPrefer. +const ( + DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" + DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" + DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" +) + +// Defines values for GetPortalPlansParamsPrefer. +const ( + GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" +) + +// Defines values for PatchPortalPlansParamsPrefer. +const ( + PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" + PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" + PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostPortalPlansParamsPrefer. +const ( + PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" + PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" + PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" + PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" + PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for DeleteServiceEndpointsParamsPrefer. +const ( + DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" + DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" + DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for GetServiceEndpointsParamsPrefer. +const ( + GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" +) + +// Defines values for PatchServiceEndpointsParamsPrefer. +const ( + PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" + PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" + PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for PostServiceEndpointsParamsPrefer. +const ( + PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" + PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" + PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" + PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" + PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for DeleteServiceFallbacksParamsPrefer. +const ( + DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" + DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" + DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for GetServiceFallbacksParamsPrefer. +const ( + GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" +) + +// Defines values for PatchServiceFallbacksParamsPrefer. +const ( + PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" + PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" + PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for PostServiceFallbacksParamsPrefer. +const ( + PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" + PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" + PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" + PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" + PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for DeleteServicesParamsPrefer. +const ( + DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" + DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" + DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" +) + +// Defines values for GetServicesParamsPrefer. +const ( + GetServicesParamsPreferCountNone GetServicesParamsPrefer = "count=none" +) + +// Defines values for PatchServicesParamsPrefer. +const ( + PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" + PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" + PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" +) + +// Defines values for PostServicesParamsPrefer. +const ( + ResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" + ResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" + ReturnMinimal PostServicesParamsPrefer = "return=minimal" + ReturnNone PostServicesParamsPrefer = "return=none" + ReturnRepresentation PostServicesParamsPrefer = "return=representation" +) + +// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) +type Networks struct { + // NetworkId Note: + // This is a Primary Key. + NetworkId string `json:"network_id"` +} + +// PortalPlans Available subscription plans for Portal Accounts +type PortalPlans struct { + PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` + + // PortalPlanType Note: + // This is a Primary Key. + PortalPlanType string `json:"portal_plan_type"` + PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` +} + +// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. +type PortalPlansPlanUsageLimitInterval string + +// ServiceEndpoints Available endpoint types for each service +type ServiceEndpoints struct { + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId Note: + // This is a Primary Key. + EndpointId int `json:"endpoint_id"` + EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. +type ServiceEndpointsEndpointType string + +// ServiceFallbacks Fallback URLs for services when primary endpoints fail +type ServiceFallbacks struct { + CreatedAt *string `json:"created_at,omitempty"` + FallbackUrl string `json:"fallback_url"` + + // ServiceFallbackId Note: + // This is a Primary Key. + ServiceFallbackId int `json:"service_fallback_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Services Supported blockchain services from the Pocket Network +type Services struct { + Active *bool `json:"active,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId *string `json:"network_id,omitempty"` + QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains []string `json:"service_domains"` + + // ServiceId Note: + // This is a Primary Key. + ServiceId string `json:"service_id"` + ServiceName string `json:"service_name"` + + // ServiceOwnerAddress Note: + // This is a Foreign Key to `gateways.gateway_address`. + ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` + SvgIcon *string `json:"svg_icon,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Limit defines model for limit. +type Limit = string + +// Offset defines model for offset. +type Offset = string + +// Order defines model for order. +type Order = string + +// PreferCount defines model for preferCount. +type PreferCount string + +// PreferPost defines model for preferPost. +type PreferPost string + +// PreferReturn defines model for preferReturn. +type PreferReturn string + +// Range defines model for range. +type Range = string + +// RangeUnit defines model for rangeUnit. +type RangeUnit = string + +// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. +type RowFilterNetworksNetworkId = string + +// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. +type RowFilterPortalPlansPlanApplicationLimit = string + +// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. +type RowFilterPortalPlansPlanRateLimitRps = string + +// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. +type RowFilterPortalPlansPlanUsageLimit = string + +// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. +type RowFilterPortalPlansPlanUsageLimitInterval = string + +// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. +type RowFilterPortalPlansPortalPlanType = string + +// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. +type RowFilterPortalPlansPortalPlanTypeDescription = string + +// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. +type RowFilterServiceEndpointsCreatedAt = string + +// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. +type RowFilterServiceEndpointsEndpointId = string + +// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. +type RowFilterServiceEndpointsEndpointType = string + +// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. +type RowFilterServiceEndpointsServiceId = string + +// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. +type RowFilterServiceEndpointsUpdatedAt = string + +// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. +type RowFilterServiceFallbacksCreatedAt = string + +// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. +type RowFilterServiceFallbacksFallbackUrl = string + +// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. +type RowFilterServiceFallbacksServiceFallbackId = string + +// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. +type RowFilterServiceFallbacksServiceId = string + +// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. +type RowFilterServiceFallbacksUpdatedAt = string + +// RowFilterServicesActive defines model for rowFilter.services.active. +type RowFilterServicesActive = string + +// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. +type RowFilterServicesComputeUnitsPerRelay = string + +// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. +type RowFilterServicesCreatedAt = string + +// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. +type RowFilterServicesDeletedAt = string + +// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. +type RowFilterServicesHardFallbackEnabled = string + +// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. +type RowFilterServicesNetworkId = string + +// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. +type RowFilterServicesQualityFallbackEnabled = string + +// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. +type RowFilterServicesServiceDomains = string + +// RowFilterServicesServiceId defines model for rowFilter.services.service_id. +type RowFilterServicesServiceId = string + +// RowFilterServicesServiceName defines model for rowFilter.services.service_name. +type RowFilterServicesServiceName = string + +// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. +type RowFilterServicesServiceOwnerAddress = string + +// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. +type RowFilterServicesSvgIcon = string + +// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. +type RowFilterServicesUpdatedAt = string + +// Select defines model for select. +type Select = string + +// DeleteNetworksParams defines parameters for DeleteNetworks. +type DeleteNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. +type DeleteNetworksParamsPrefer string + +// GetNetworksParams defines parameters for GetNetworks. +type GetNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetNetworksParamsPrefer defines parameters for GetNetworks. +type GetNetworksParamsPrefer string + +// PatchNetworksParams defines parameters for PatchNetworks. +type PatchNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchNetworksParamsPrefer defines parameters for PatchNetworks. +type PatchNetworksParamsPrefer string + +// PostNetworksParams defines parameters for PostNetworks. +type PostNetworksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostNetworksParamsPrefer defines parameters for PostNetworks. +type PostNetworksParamsPrefer string + +// DeletePortalPlansParams defines parameters for DeletePortalPlans. +type DeletePortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. +type DeletePortalPlansParamsPrefer string + +// GetPortalPlansParams defines parameters for GetPortalPlans. +type GetPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. +type GetPortalPlansParamsPrefer string + +// PatchPortalPlansParams defines parameters for PatchPortalPlans. +type PatchPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. +type PatchPortalPlansParamsPrefer string + +// PostPortalPlansParams defines parameters for PostPortalPlans. +type PostPortalPlansParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. +type PostPortalPlansParamsPrefer string + +// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParamsPrefer string + +// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParamsPrefer string + +// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParamsPrefer string + +// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParamsPrefer string + +// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParamsPrefer string + +// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParamsPrefer string + +// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParamsPrefer string + +// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParamsPrefer string + +// DeleteServicesParams defines parameters for DeleteServices. +type DeleteServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServicesParamsPrefer defines parameters for DeleteServices. +type DeleteServicesParamsPrefer string + +// GetServicesParams defines parameters for GetServices. +type GetServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServicesParamsPrefer defines parameters for GetServices. +type GetServicesParamsPrefer string + +// PatchServicesParams defines parameters for PatchServices. +type PatchServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServicesParamsPrefer defines parameters for PatchServices. +type PatchServicesParamsPrefer string + +// PostServicesParams defines parameters for PostServices. +type PostServicesParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServicesParamsPrefer defines parameters for PostServices. +type PostServicesParamsPrefer string + +// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. +type PatchNetworksJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. +type PostNetworksJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. +type PatchPortalPlansJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. +type PostPortalPlansJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. +type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. +type PostServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. +type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. +type PostServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. +type PatchServicesJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services + +// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. +type PostServicesJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services diff --git a/portal-db/testdata/test-data.sql b/portal-db/testdata/test-data.sql new file mode 100644 index 000000000..e58f9e8d4 --- /dev/null +++ b/portal-db/testdata/test-data.sql @@ -0,0 +1,89 @@ +-- ============================================================================ +-- TEST DATA FOR PORTAL DATABASE +-- ============================================================================ + +-- Insert test portal plans +INSERT INTO portal_plans (portal_plan_type, portal_plan_type_description, plan_usage_limit, plan_usage_limit_interval, plan_rate_limit_rps, plan_application_limit) VALUES + ('FREE', 'Free tier with basic limits', 1000, 'day', 10, 2), + ('STARTER', 'Starter plan for small projects', 10000, 'day', 50, 5), + ('PRO', 'Professional plan for growing businesses', 100000, 'month', 200, 20), + ('ENTERPRISE', 'Enterprise plan with custom limits', NULL, NULL, 1000, 100); + +-- Insert test organizations +INSERT INTO organizations (organization_name) VALUES + ('Acme Corporation'), + ('Tech Innovators LLC'), + ('Blockchain Solutions Inc'), + ('Web3 Builders Co'); + +-- Insert test services +INSERT INTO services (service_id, service_name, compute_units_per_relay, service_domains, network_id, active, quality_fallback_enabled, hard_fallback_enabled) VALUES + ('ethereum-mainnet', 'Ethereum Mainnet', 1, ARRAY['eth-mainnet.gateway.pokt.network'], 'pocket', true, true, false), + ('ethereum-sepolia', 'Ethereum Sepolia Testnet', 1, ARRAY['eth-sepolia.gateway.pokt.network'], 'pocket', true, false, false), + ('polygon-mainnet', 'Polygon Mainnet', 1, ARRAY['poly-mainnet.gateway.pokt.network'], 'pocket', true, true, true), + ('arbitrum-one', 'Arbitrum One', 2, ARRAY['arbitrum-one.gateway.pokt.network'], 'pocket', true, false, false), + ('base-mainnet', 'Base Mainnet', 2, ARRAY['base-mainnet.gateway.pokt.network'], 'pocket', false, false, false); + +-- Insert test service endpoints +INSERT INTO service_endpoints (service_id, endpoint_type) VALUES + ('ethereum-mainnet', 'JSON-RPC'), + ('ethereum-mainnet', 'WSS'), + ('ethereum-sepolia', 'JSON-RPC'), + ('polygon-mainnet', 'JSON-RPC'), + ('polygon-mainnet', 'REST'), + ('arbitrum-one', 'JSON-RPC'), + ('base-mainnet', 'JSON-RPC'); + +-- Insert test service fallbacks +INSERT INTO service_fallbacks (service_id, fallback_url) VALUES + ('ethereum-mainnet', 'https://eth-mainnet.infura.io/v3/fallback'), + ('ethereum-mainnet', 'https://mainnet.infura.io/v3/backup'), + ('polygon-mainnet', 'https://polygon-mainnet.infura.io/v3/fallback'), + ('arbitrum-one', 'https://arbitrum-mainnet.infura.io/v3/fallback'); + +-- Insert test portal users +INSERT INTO portal_users (portal_user_email, signed_up, portal_admin) VALUES + ('admin@grove.city', true, true), + ('alice@acme.com', true, false), + ('bob@techinnovators.com', true, false), + ('charlie@blockchain.com', false, false); + +-- Insert test portal accounts +INSERT INTO portal_accounts (organization_id, portal_plan_type, user_account_name, internal_account_name, billing_type) VALUES + (1, 'ENTERPRISE', 'acme-corp', 'internal-acme', 'stripe'), + (2, 'PRO', 'tech-innovators', 'internal-tech', 'stripe'), + (3, 'STARTER', 'blockchain-solutions', 'internal-blockchain', 'gcp'), + (4, 'FREE', 'web3-builders', 'internal-web3', 'stripe'); + +-- Insert test portal applications +INSERT INTO portal_applications ( + portal_account_id, + portal_application_name, + emoji, + portal_application_description, + favorite_service_ids, + secret_key_required +) +SELECT + pa.portal_account_id, + CASE + WHEN pa.user_account_name = 'acme-corp' THEN 'DeFi Dashboard' + WHEN pa.user_account_name = 'tech-innovators' THEN 'NFT Marketplace' + WHEN pa.user_account_name = 'blockchain-solutions' THEN 'Analytics Platform' + ELSE 'Test Application' + END, + CASE + WHEN pa.user_account_name = 'acme-corp' THEN '๐Ÿ’ฐ' + WHEN pa.user_account_name = 'tech-innovators' THEN '๐Ÿ–ผ๏ธ' + WHEN pa.user_account_name = 'blockchain-solutions' THEN '๐Ÿ“Š' + ELSE '๐Ÿงช' + END, + CASE + WHEN pa.user_account_name = 'acme-corp' THEN 'Real-time DeFi protocol dashboard' + WHEN pa.user_account_name = 'tech-innovators' THEN 'Multi-chain NFT marketplace application' + WHEN pa.user_account_name = 'blockchain-solutions' THEN 'Cross-chain analytics and monitoring' + ELSE 'General purpose test application' + END, + ARRAY['ethereum-mainnet', 'polygon-mainnet'], + true +FROM portal_accounts pa; From ab56f4c7ff518e6809e1fcf8f1e025eb8165089c Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 16 Sep 2025 19:40:07 +0100 Subject: [PATCH 02/43] claude cmd_code_review --- portal-db/Makefile | 2 +- portal-db/README.md | 2 +- portal-db/api/README.md | 41 ++++++++++++++++++-------- portal-db/api/codegen/generate-sdks.sh | 8 +++++ portal-db/docker-compose.yml | 5 +--- portal-db/sdk/go/README.md | 2 +- 6 files changed, 41 insertions(+), 19 deletions(-) diff --git a/portal-db/Makefile b/portal-db/Makefile index ae35b0cd9..91f43d225 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -31,7 +31,7 @@ setup-db: ## Set up database roles and permissions for API access @echo "๐Ÿ”ง Setting up database roles and permissions..." @if ! docker ps | grep -q path-portal-db; then \ echo "โŒ Portal DB is not running. Please start it first:"; \ - echo " cd .. && make portal_db_up"; \ + echo " make portal_db_up"; \ exit 1; \ fi @echo " Applying API database setup..." diff --git a/portal-db/README.md b/portal-db/README.md index 0625a1585..58025db62 100644 --- a/portal-db/README.md +++ b/portal-db/README.md @@ -181,7 +181,7 @@ Using a postgres MCP server is experimental but worth a shot! - Favor correctness, readability, and performance best practices in all SQL you produce. ``` -5. Upload [init/001_schema.sql](init/001_schema.sql) as one of the files to the Claude Project. +5. Upload [schema/001_schema.sql](schema/001_schema.sql) as one of the files to the Claude Project. 6. Try using it by asking: `How many records are in my database?` diff --git a/portal-db/api/README.md b/portal-db/api/README.md index cdac49551..7b324366e 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -112,12 +112,13 @@ This PostgREST API provides: 3. **Start the API services**: ```bash - make up + make postgrest-up ``` 4. **Verify the setup**: ```bash - make test-api + # Test API endpoint + curl http://localhost:3000/networks ``` ### Services URLs @@ -516,6 +517,16 @@ func authenticatedExample() { **For complete Go SDK documentation, see [SDK README](../sdk/go/README.md)** + + + + + + + + + + ## ๐Ÿ”ง Development ### Development Environment @@ -523,20 +534,20 @@ func authenticatedExample() { Start a full development environment with all services: ```bash -make dev # Starts PostgREST, Swagger UI, and Auth Service +make postgrest-up # Starts PostgREST and PostgreSQL services ``` ### Available Commands -| Command | Description | -| --------------- | --------------------------- | -| `make help` | Show all available commands | -| `make up` | Start API services | -| `make down` | Stop API services | -| `make logs` | Show service logs | -| `make status` | Show service status | -| `make test-api` | Test API endpoints | -| `make clean` | Clean up and reset | +| Command | Description | +| ---------------------- | ----------------------------------- | +| `make postgrest-up` | Start PostgREST and PostgreSQL | +| `make postgrest-down` | Stop PostgREST and PostgreSQL | +| `make postgrest-logs` | Show service logs | +| `make setup-db` | Set up database roles and permissions | +| `make generate-openapi`| Generate OpenAPI specification | +| `make generate-sdks` | Generate Go SDK from OpenAPI spec | +| `make generate-all` | Generate both OpenAPI spec and SDKs | ### Database Schema Changes @@ -656,6 +667,12 @@ curl -H "Accept: application/openapi+json" \ - [OpenAPI Specification](https://swagger.io/specification/) - [JWT.io](https://jwt.io/) - JWT token debugging + + + + + + ## ๐Ÿค Contributing When contributing to the API: diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index cf686d94f..9485365b6 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -3,6 +3,14 @@ # Generate Go SDK from OpenAPI specification using oapi-codegen # This script generates a Go client SDK for the Portal DB API +# TODO_IMPLEMENT: Add TypeScript SDK generation support +# - Add TypeScript SDK generation alongside Go SDK generation +# - Use @openapitools/openapi-generator-cli or similar tool +# - Target output: ../../sdk/typescript/ directory +# - Should generate: models, client, types, and documentation +# - Add TypeScript-specific configuration files similar to codegen-*.yaml +# - Priority: Medium - would significantly improve frontend/Node.js developer experience + set -e # Configuration diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 3e054fa6d..299ff1cf3 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -9,7 +9,7 @@ services: ports: - "5435:5432" volumes: - - portal_db_data:/var/lib/postgresql/data + - ./tmp/portal_db_data:/var/lib/postgresql/data - ./schema:/docker-entrypoint-initdb.d healthcheck: test: ["CMD", "pg_isready", "-U", "portal_user", "-d", "portal_db"] @@ -49,6 +49,3 @@ services: interval: 30s timeout: 10s retries: 3 - -volumes: - portal_db_data: \ No newline at end of file diff --git a/portal-db/sdk/go/README.md b/portal-db/sdk/go/README.md index a312eaa01..55cea3fca 100644 --- a/portal-db/sdk/go/README.md +++ b/portal-db/sdk/go/README.md @@ -200,7 +200,7 @@ This SDK was generated from the OpenAPI specification served by PostgREST. To re make generate-sdks # Or directly run the script -cd api/scripts +cd api/codegen ./generate-sdks.sh ``` From 6efdaf37df6d170fcc33ed08e07be1634fd581e3 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 17 Sep 2025 16:08:58 +0100 Subject: [PATCH 03/43] move postgrest config to file and add file documentation --- portal-db/Makefile | 6 +- portal-db/api/postgrest/init.sql | 262 +++---------------------- portal-db/api/postgrest/postgrest.conf | 75 +++++-- portal-db/docker-compose.yml | 69 +++++-- 4 files changed, 130 insertions(+), 282 deletions(-) diff --git a/portal-db/Makefile b/portal-db/Makefile index 91f43d225..4f6394187 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -10,18 +10,18 @@ postgrest-up: ## Start PostgREST API service and PostgreSQL DB @echo "๐Ÿš€ Starting Portal DB API services..." - cd .. && docker compose up -d postgres postgrest + docker compose up -d @echo "โœ… Services started!" @echo " PostgreSQL DB: localhost:5435" @echo " PostgREST API: http://localhost:3000" postgrest-down: ## Stop PostgREST API service and PostgreSQL DB @echo "๐Ÿ›‘ Stopping Portal DB API services..." - cd .. && docker compose down + docker compose down @echo "โœ… Services stopped!" postgrest-logs: ## Show logs from PostgREST API service and PostgreSQL DB - cd .. && docker compose logs -f + docker compose logs -f # ============================================================================ # DATABASE SETUP diff --git a/portal-db/api/postgrest/init.sql b/portal-db/api/postgrest/init.sql index 5e9d5fe11..22382c837 100644 --- a/portal-db/api/postgrest/init.sql +++ b/portal-db/api/postgrest/init.sql @@ -1,274 +1,56 @@ -- ============================================================================ -- PostgREST API Setup for Portal DB -- ============================================================================ --- This file sets up the necessary roles and permissions for PostgREST API access --- Run this after the main schema (001_schema.sql) has been loaded +-- Minimal setup for PostgREST API access -- ============================================================================ --- CREATE API ROLES +-- CREATE ESSENTIAL POSTGREST ROLES -- ============================================================================ +-- Create the authenticator role (used by PostgREST to connect) +-- This role can switch to other roles but has no direct permissions +CREATE ROLE authenticator NOINHERIT LOGIN PASSWORD 'authenticator_password'; + -- Anonymous role - for public API access (read-only by default) -DROP ROLE IF EXISTS web_anon; -CREATE ROLE web_anon NOLOGIN; +CREATE ROLE anon NOLOGIN; -- Authenticated role - for authenticated API access -DROP ROLE IF EXISTS web_user; -CREATE ROLE web_user NOLOGIN; - --- Admin role - for administrative API access -DROP ROLE IF EXISTS web_admin; -CREATE ROLE web_admin NOLOGIN; +CREATE ROLE authenticated NOLOGIN; -- ============================================================================ -- GRANT BASIC PERMISSIONS -- ============================================================================ --- Grant usage on schema -GRANT USAGE ON SCHEMA public TO web_anon, web_user, web_admin; +-- Grant usage on public schema +GRANT USAGE ON SCHEMA public TO anon, authenticated; --- Grant sequence usage for auto-incrementing IDs -GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO web_user, web_admin; - --- ============================================================================ --- READ-ONLY PERMISSIONS (web_anon) --- ============================================================================ - --- Grant SELECT on most tables for anonymous users (public data) +-- Grant basic SELECT permissions for anonymous users (public data only) GRANT SELECT ON TABLE networks, services, service_endpoints, service_fallbacks, portal_plans -TO web_anon; - --- ============================================================================ --- AUTHENTICATED USER PERMISSIONS (web_user) --- ============================================================================ +TO anon; --- Inherit anonymous permissions -GRANT web_anon TO web_user; - --- Read access to more tables for authenticated users -GRANT SELECT ON TABLE +-- Grant authenticated users access to anon role permissions plus more tables +GRANT anon TO authenticated; +GRANT SELECT ON TABLE organizations, portal_accounts, portal_applications, applications, gateways -TO web_user; - --- Limited write access for user-owned resources --- Users can only modify their own data (enforced by RLS policies) -GRANT INSERT, UPDATE ON TABLE - portal_users, - contacts, - portal_accounts, - portal_applications, - portal_application_allowlists -TO web_user; - --- ============================================================================ --- ADMIN PERMISSIONS (web_admin) --- ============================================================================ - --- Inherit user permissions -GRANT web_user TO web_admin; - --- Full access to all tables for admin users -GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO web_admin; - --- ============================================================================ --- ROW LEVEL SECURITY (RLS) POLICIES --- ============================================================================ - --- Enable RLS on sensitive tables -ALTER TABLE portal_users ENABLE ROW LEVEL SECURITY; -ALTER TABLE portal_accounts ENABLE ROW LEVEL SECURITY; -ALTER TABLE portal_applications ENABLE ROW LEVEL SECURITY; -ALTER TABLE contacts ENABLE ROW LEVEL SECURITY; -ALTER TABLE portal_account_rbac ENABLE ROW LEVEL SECURITY; -ALTER TABLE portal_application_rbac ENABLE ROW LEVEL SECURITY; -ALTER TABLE portal_application_allowlists ENABLE ROW LEVEL SECURITY; - --- ============================================================================ --- RLS POLICIES FOR PORTAL_USERS --- ============================================================================ - --- Users can view their own profile -CREATE POLICY "Users can view own profile" ON portal_users - FOR SELECT - USING (portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'); - --- Users can update their own profile -CREATE POLICY "Users can update own profile" ON portal_users - FOR UPDATE - USING (portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'); - --- Admins can view all users -CREATE POLICY "Admins can view all users" ON portal_users - FOR ALL - TO web_admin - USING (true); - --- ============================================================================ --- RLS POLICIES FOR PORTAL_ACCOUNTS --- ============================================================================ - --- Users can view accounts they have access to -CREATE POLICY "Users can view accessible accounts" ON portal_accounts - FOR SELECT - USING ( - portal_account_id IN ( - SELECT pa.portal_account_id - FROM portal_account_rbac pa - JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - ) - ); - --- Account owners can update their accounts -CREATE POLICY "Account owners can update accounts" ON portal_accounts - FOR UPDATE - USING ( - portal_account_id IN ( - SELECT pa.portal_account_id - FROM portal_account_rbac pa - JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - AND pa.role_name = 'owner' - ) - ); - --- ============================================================================ --- RLS POLICIES FOR PORTAL_APPLICATIONS --- ============================================================================ - --- Users can view applications they have access to -CREATE POLICY "Users can view accessible applications" ON portal_applications - FOR SELECT - USING ( - portal_account_id IN ( - SELECT pa.portal_account_id - FROM portal_account_rbac pa - JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - ) - ); - --- Users can create applications in accounts they have access to -CREATE POLICY "Users can create applications in accessible accounts" ON portal_applications - FOR INSERT - WITH CHECK ( - portal_account_id IN ( - SELECT pa.portal_account_id - FROM portal_account_rbac pa - JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - ) - ); - --- Users can update applications they have access to -CREATE POLICY "Users can update accessible applications" ON portal_applications - FOR UPDATE - USING ( - portal_account_id IN ( - SELECT pa.portal_account_id - FROM portal_account_rbac pa - JOIN portal_users pu ON pa.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - ) - ); - --- ============================================================================ --- API HELPER FUNCTIONS --- ============================================================================ - --- Function to get current user info -CREATE OR REPLACE FUNCTION api.current_user_info() -RETURNS TABLE ( - user_id INTEGER, - email VARCHAR(255), - is_admin BOOLEAN -) -LANGUAGE sql STABLE SECURITY DEFINER -AS $$ - SELECT - pu.portal_user_id, - pu.portal_user_email, - pu.portal_admin - FROM portal_users pu - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'; -$$; - --- Function to get user's accessible accounts -CREATE OR REPLACE FUNCTION api.user_accounts() -RETURNS TABLE ( - account_id UUID, - account_name VARCHAR(42), - role_name VARCHAR(20), - plan_type VARCHAR(42) -) -LANGUAGE sql STABLE SECURITY DEFINER -AS $$ - SELECT - pa.portal_account_id, - pa.user_account_name, - par.role_name, - pa.portal_plan_type - FROM portal_accounts pa - JOIN portal_account_rbac par ON pa.portal_account_id = par.portal_account_id - JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email'; -$$; - --- Function to get user's accessible applications -CREATE OR REPLACE FUNCTION api.user_applications() -RETURNS TABLE ( - application_id UUID, - application_name VARCHAR(42), - account_id UUID, - account_name VARCHAR(42) -) -LANGUAGE sql STABLE SECURITY DEFINER -AS $$ - SELECT - pa.portal_application_id, - pa.portal_application_name, - pac.portal_account_id, - pac.user_account_name - FROM portal_applications pa - JOIN portal_accounts pac ON pa.portal_account_id = pac.portal_account_id - JOIN portal_account_rbac par ON pac.portal_account_id = par.portal_account_id - JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id - WHERE pu.portal_user_email = current_setting('request.jwt.claims', true)::json->>'email' - AND pa.deleted_at IS NULL; -$$; - --- ============================================================================ --- CREATE API SCHEMA FOR FUNCTIONS --- ============================================================================ +TO authenticated; +-- Create API schema for functions CREATE SCHEMA IF NOT EXISTS api; -GRANT USAGE ON SCHEMA api TO web_anon, web_user, web_admin; -GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA api TO web_anon, web_user, web_admin; - --- ============================================================================ --- GRANTS FOR API SCHEMA --- ============================================================================ - --- Ensure the authenticator role can switch to our API roles --- Note: This will be handled by your JWT authentication setup -GRANT web_anon TO current_user; -GRANT web_user TO current_user; -GRANT web_admin TO current_user; +GRANT USAGE ON SCHEMA api TO anon, authenticated; -- ============================================================================ --- COMMENTS +-- GRANTS FOR AUTHENTICATOR -- ============================================================================ -COMMENT ON ROLE web_anon IS 'Anonymous role for public API access (read-only)'; -COMMENT ON ROLE web_user IS 'Authenticated role for standard API access'; -COMMENT ON ROLE web_admin IS 'Administrative role for full API access'; -COMMENT ON SCHEMA api IS 'API functions and procedures for PostgREST'; +-- Grant the authenticator role the ability to switch to API roles +GRANT anon TO authenticator; +GRANT authenticated TO authenticator; diff --git a/portal-db/api/postgrest/postgrest.conf b/portal-db/api/postgrest/postgrest.conf index 555baea38..95b6b170b 100644 --- a/portal-db/api/postgrest/postgrest.conf +++ b/portal-db/api/postgrest/postgrest.conf @@ -1,33 +1,68 @@ -# PostgREST Configuration for Portal DB -# Documentation: https://postgrest.org/en/stable/configuration.html +# ============================================================================ +# PostgREST Configuration File +# ============================================================================ +# Documentation: https://postgrest.org/en/stable/references/configuration.html -# Database connection -db-uri = "postgresql://portal_user:portal_password@localhost:5435/portal_db" -db-schemas = "public" -db-anon-role = "web_anon" -db-pool = 10 +# ============================================================================ +# DATABASE CONNECTION +# ============================================================================ + +# The database connection URI +# https://postgrest.org/en/stable/references/configuration.html#db-uri +db-uri = "postgresql://authenticator:authenticator_password@postgres:5432/portal_db" + +# Database schemas to expose via the API +# https://postgrest.org/en/stable/references/configuration.html#db-schemas +db-schemas = "public,api" + +# The database role to use when no client authentication is provided +# https://postgrest.org/en/stable/references/configuration.html#db-anon-role +db-anon-role = "anon" + +# ============================================================================ +# SERVER CONFIGURATION +# ============================================================================ -# Server settings +# Where to bind the PostgREST web server +# https://postgrest.org/en/stable/references/configuration.html#server-host server-host = "0.0.0.0" + +# The TCP port to bind the web server +# https://postgrest.org/en/stable/references/configuration.html#server-port server-port = 3000 -# JWT Settings (optional - for authentication) -# jwt-secret = "your-jwt-secret-here" -# jwt-aud = "your-audience" +# ============================================================================ +# OPENAPI CONFIGURATION +# ============================================================================ -# API settings +# Specifies how the OpenAPI output should be displayed +# https://postgrest.org/en/stable/references/configuration.html#openapi-mode openapi-mode = "follow-privileges" + +# Overrides the base URL used within the OpenAPI self-documentation +# https://postgrest.org/en/stable/references/configuration.html#openapi-server-proxy-uri openapi-server-proxy-uri = "http://localhost:3000" -# CORS settings -server-cors-allowed-origins = "*" +# ============================================================================ +# CORS CONFIGURATION +# ============================================================================ + +# Specifies allowed CORS origins (empty string allows all origins) +# https://postgrest.org/en/stable/references/configuration.html#server-cors-allowed-origins +server-cors-allowed-origins = "" -# Logging +# ============================================================================ +# LOGGING CONFIGURATION +# ============================================================================ + +# Specifies the level of information to be logged +# https://postgrest.org/en/stable/references/configuration.html#log-level log-level = "info" -# Rate limiting (optional) -# server-max-rows = 1000 -# server-pre-request = "public.check_rate_limit" +# ============================================================================ +# CONNECTION POOL CONFIGURATION +# ============================================================================ -# Schema cache -db-schema-cache-size = 100 +# Maximum number of connections in the database pool +# https://postgrest.org/en/stable/references/configuration.html#db-pool +db-pool = 10 diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 299ff1cf3..a8a26c4f5 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -1,50 +1,81 @@ +# ============================================================================ +# Portal Database Local Development Environment +# ============================================================================ +# This Docker Compose file provides a complete local development setup for +# the Grove Portal Database with PostgREST API access. +# +# Services included: +# - PostgreSQL 17: Portal database with schema and test data +# - PostgREST: Automatic REST API generation from database schema +# +# Usage: +# make postgrest-up # Start both services +# make postgrest-down # Stop and remove containers +# make postgrest-logs # View service logs +# +# Access: +# Database: localhost:5435 (user: postgres, password: portal_password) +# REST API: http://localhost:3000 +# API Docs: http://localhost:3000 (OpenAPI/Swagger) +# +# ============================================================================ + services: + # ============================================================================ + # PostgreSQL Database Server + # ============================================================================ + # Provides the core Portal database with complete schema and optional test data + # Documentation: https://hub.docker.com/_/postgres postgres: image: postgres:17 - container_name: path-portal-db + container_name: portal-db environment: + # Database configuration for local development + # Production uses CloudSQL with different credentials POSTGRES_DB: portal_db - POSTGRES_USER: portal_user POSTGRES_PASSWORD: portal_password + # Using default 'postgres' superuser for initialization scripts ports: + # Map to non-standard port to avoid conflicts with existing PostgreSQL - "5435:5432" volumes: + # PostgreSQL data persistence (survives container restarts) - ./tmp/portal_db_data:/var/lib/postgresql/data - - ./schema:/docker-entrypoint-initdb.d + # Initialization scripts (run in alphabetical order on first startup) + # Documentation: https://hub.docker.com/_/postgres#initialization-scripts + - ./schema/001_schema.sql:/docker-entrypoint-initdb.d/001_schema.sql:ro + - ./api/postgrest/init.sql:/docker-entrypoint-initdb.d/999_postgrest_init.sql:ro healthcheck: - test: ["CMD", "pg_isready", "-U", "portal_user", "-d", "portal_db"] + # Health check to ensure database is ready before starting PostgREST + test: ["CMD", "pg_isready", "-U", "postgres", "-d", "portal_db"] interval: 10s timeout: 5s retries: 5 + # ============================================================================ # PostgREST API Server + # ============================================================================ + # Automatically generates REST API endpoints from PostgreSQL schema + # Provides instant CRUD operations, OpenAPI docs, and JWT authentication + # Documentation: https://docs.postgrest.org/en/v13/ postgrest: image: postgrest/postgrest:v12.0.2 container_name: portal-db-api ports: + # PostgREST API and documentation server - "3000:3000" - environment: - # PostgREST will read the config file - PGRST_DB_URI: postgresql://portal_user:portal_password@postgres:5432/portal_db - PGRST_DB_SCHEMAS: public,api - PGRST_DB_ANON_ROLE: web_anon - PGRST_DB_POOL: 10 - PGRST_SERVER_HOST: 0.0.0.0 - PGRST_SERVER_PORT: 3000 - PGRST_OPENAPI_MODE: follow-privileges - PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:3000 - PGRST_SERVER_CORS_ALLOWED_ORIGINS: "*" - PGRST_SERVER_CORS_ALLOWED_HEADERS: "accept, authorization, content-type, x-requested-with, range" - PGRST_SERVER_CORS_EXPOSED_HEADERS: "content-range, content-profile" - PGRST_LOG_LEVEL: info volumes: + # Mount PostgREST configuration file (see api/postgrest/postgrest.conf) + # Configuration docs: https://docs.postgrest.org/en/v13/references/configuration.html - ./api/postgrest/postgrest.conf:/etc/postgrest/postgrest.conf:ro + command: ["postgrest", "/etc/postgrest/postgrest.conf"] depends_on: postgres: + # Wait for PostgreSQL to be healthy before starting PostgREST condition: service_healthy - command: ["postgrest", "/etc/postgrest/postgrest.conf"] restart: unless-stopped healthcheck: + # Health check for PostgREST API availability test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"] interval: 30s timeout: 10s From 9c9a2dc0746dc06c23c6fa0c77d8f6668add9d71 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 17 Sep 2025 20:08:40 +0100 Subject: [PATCH 04/43] clean up PostgREST config and update documentation --- portal-db/Makefile | 112 +- portal-db/README.md | 9 +- portal-db/api/README.md | 808 +- portal-db/api/codegen/generate-openapi.sh | 19 +- portal-db/api/codegen/generate-sdks.sh | 14 +- portal-db/api/openapi/openapi.json | 2692 ++++- portal-db/api/postgrest/init.sql | 65 +- portal-db/api/postgrest/postgrest.conf | 31 + portal-db/api/scripts/gen-jwt.sh | 142 + portal-db/api/scripts/generate-sdks.sh | 239 - portal-db/api/scripts/test-auth.sh | 130 + portal-db/scripts/hydrate-testdata.sh | 242 + portal-db/sdk/go/README.md | 189 +- portal-db/sdk/go/client.go | 10673 ++++++++++++++++---- portal-db/sdk/go/models.go | 1066 +- portal-db/sdk/typescript/README.md | 1 + portal-db/testdata/test-data.sql | 89 - 17 files changed, 13197 insertions(+), 3324 deletions(-) create mode 100755 portal-db/api/scripts/gen-jwt.sh delete mode 100644 portal-db/api/scripts/generate-sdks.sh create mode 100755 portal-db/api/scripts/test-auth.sh create mode 100755 portal-db/scripts/hydrate-testdata.sh create mode 100644 portal-db/sdk/typescript/README.md delete mode 100644 portal-db/testdata/test-data.sql diff --git a/portal-db/Makefile b/portal-db/Makefile index 4f6394187..de8c6b5f9 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -2,7 +2,8 @@ # Provides convenient commands for managing the PostgREST API .PHONY: postgrest-up postgrest-down postgrest-logs -.PHONY: setup-db generate-openapi generate-sdks test-api clean +.PHONY: generate-openapi generate-sdks generate-all test-auth +.PHONY: hydrate-testdata hydrate-services hydrate-applications hydrate-gateways # ============================================================================ # SERVICE MANAGEMENT @@ -23,23 +24,18 @@ postgrest-down: ## Stop PostgREST API service and PostgreSQL DB postgrest-logs: ## Show logs from PostgREST API service and PostgreSQL DB docker compose logs -f -# ============================================================================ -# DATABASE SETUP -# ============================================================================ +portal-db-up: ## Start Portal DB PostgreSQL container only + @echo "๐Ÿš€ Starting Portal DB PostgreSQL container..." + docker compose up -d portal-db + @echo "โœ… PostgreSQL container started!" + @echo " Database: localhost:5435" + @echo " User: postgres" + @echo " Password: portal_password" -setup-db: ## Set up database roles and permissions for API access - @echo "๐Ÿ”ง Setting up database roles and permissions..." - @if ! docker ps | grep -q path-portal-db; then \ - echo "โŒ Portal DB is not running. Please start it first:"; \ - echo " make portal_db_up"; \ - exit 1; \ - fi - @echo " Applying API database setup..." - docker exec -i path-portal-db psql -U portal_user -d portal_db < postgrest/schema.sql - @echo "โœ… Database setup completed!" - @echo " Created roles: web_anon, web_user, web_admin" - @echo " Applied row-level security policies" - @echo " Created API helper functions" +portal-db-down: ## Stop Portal DB PostgreSQL container only + @echo "๐Ÿ›‘ Stopping Portal DB PostgreSQL container..." + docker compose down portal-db + @echo "โœ… PostgreSQL container stopped!" # ============================================================================ # API GENERATION @@ -56,3 +52,85 @@ generate-sdks: ## Generate Go SDK from OpenAPI spec generate-all: generate-openapi generate-sdks ## Generate OpenAPI spec and Go SDK @echo "โœจ All generation tasks completed!" + +# ============================================================================ +# AUTHENTICATION & TESTING +# ============================================================================ + +test-auth: ## Test JWT authentication flow + @echo "๐Ÿ” Testing JWT authentication..." + @if ! docker ps | grep -q portal-db-api; then \ + echo "โŒ PostgREST API is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + cd api/scripts && ./test-auth.sh + +gen-jwt: ## Generate JWT token + @echo "๐Ÿ”‘ Generating JWT token..." + @if ! docker ps | grep -q portal-db-api; then \ + echo "โŒ PostgREST API is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + cd api/scripts && ./gen-jwt.sh + +# ============================================================================ +# DATA HYDRATION +# ============================================================================ +# Database connection for all hydrate scripts (matches docker-compose.yml) +DB_CONNECTION_STRING := postgresql://postgres:portal_password@localhost:5435/portal_db + +hydrate-testdata: ## Populate database with test data for development + @echo "๐Ÿงช Hydrating Portal DB with test data..." + @if ! docker ps | grep -q portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" ./scripts/hydrate-testdata.sh + +hydrate-services: ## Hydrate services table from blockchain data + @echo "๐ŸŒ Hydrating services table..." + @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(SERVICE_IDS)" ]; then \ + echo "โŒ Required parameters missing. Usage:"; \ + echo " make hydrate-services NODE= NETWORK= SERVICE_IDS="; \ + echo " Example: make hydrate-services NODE=https://node.example.com NETWORK=pocket SERVICE_IDS=ethereum-mainnet,polygon-mainnet"; \ + exit 1; \ + fi + @if ! docker ps | grep -q portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" SERVICE_IDS="$(SERVICE_IDS)" ./scripts/hydrate-services.sh + +hydrate-applications: ## Hydrate applications table from blockchain data + @echo "๐Ÿ“ฑ Hydrating applications table..." + @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(APPLICATION_ADDRESSES)" ]; then \ + echo "โŒ Required parameters missing. Usage:"; \ + echo " make hydrate-applications NODE= NETWORK= APPLICATION_ADDRESSES="; \ + echo " Example: make hydrate-applications NODE=https://node.example.com NETWORK=pocket APPLICATION_ADDRESSES=addr1,addr2"; \ + exit 1; \ + fi + @if ! docker ps | grep -q portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" APPLICATION_ADDRESSES="$(APPLICATION_ADDRESSES)" ./scripts/hydrate-applications.sh + +hydrate-gateways: ## Hydrate gateways table from blockchain data + @echo "๐Ÿ”— Hydrating gateways table..." + @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(GATEWAY_ADDRESSES)" ]; then \ + echo "โŒ Required parameters missing. Usage:"; \ + echo " make hydrate-gateways NODE= NETWORK= GATEWAY_ADDRESSES="; \ + echo " Example: make hydrate-gateways NODE=https://node.example.com NETWORK=pocket GATEWAY_ADDRESSES=addr1,addr2"; \ + exit 1; \ + fi + @if ! docker ps | grep -q portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" GATEWAY_ADDRESSES="$(GATEWAY_ADDRESSES)" ./scripts/hydrate-gateways.sh diff --git a/portal-db/README.md b/portal-db/README.md index 58025db62..8a87efadb 100644 --- a/portal-db/README.md +++ b/portal-db/README.md @@ -4,6 +4,12 @@ The Portal DB is the house for all core business logic for both PATH and the Por The Portal DB is a _highly opinionated_ implementation of a Postgres database that can be used to manage and administer both PATH and a UI on top of PATH. +## ๐ŸŒ REST API Access + +The Portal DB includes a **PostgREST API** that automatically generates REST endpoints from your database schema. This provides instant HTTP access to all your data with authentication, filtering, and Go SDK generation. + +**โžก๏ธ [View PostgREST API Documentation](api/README.md)** for setup, authentication, and SDK usage. + :::info TODO: Revisit docs location Consider if this should be moved into `docusaurus/docs` so it is discoverable as part of [path.grove.city](https://path.grove.city/). @@ -12,6 +18,7 @@ Consider if this should be moved into `docusaurus/docs` so it is discoverable as ## Table of Contents +- [๐ŸŒ REST API Access](#-rest-api-access) - [Quickstart (for Grove Engineering)](#quickstart-for-grove-engineering) - [Interacting with the database](#interacting-with-the-database) - [`make` Targets](#make-targets) @@ -23,7 +30,7 @@ Consider if this should be moved into `docusaurus/docs` so it is discoverable as ## Quickstart (for Grove Engineering) -We'll connection to the following gateway and applications: +We'll connect to the following gateway and applications: - gateway - `pokt1lf0kekv9zcv9v3wy4v6jx2wh7v4665s8e0sl9s` - solana app - `pokt1xd8jrccxtlzs8svrmg6gukn7umln7c2ww327xx` diff --git a/portal-db/api/README.md b/portal-db/api/README.md index 7b324366e..2af3eb794 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -1,687 +1,385 @@ -# Portal DB PostgREST API +# Portal Database API -This directory contains the PostgREST API setup for the Portal Database, providing a RESTful API automatically generated from your PostgreSQL schema. +This folder contains **PostgREST configuration** and **SDK generation tools** for the Portal Database. -## ๐Ÿš€ Quick Start +PostgREST automatically creates a REST API from the Portal DB PostgreSQL database schema. -```bash -# 1. Start the portal database (from parent directory) -cd .. && make portal_db_up - -# 2. Set up API database roles and permissions (from api directory) -cd api && make setup-db +## ๐Ÿš€ Quick Start -# 3. Start the API services (PostgreSQL + PostgREST) -make up +### 1. Start PostgREST -# 4. Generate OpenAPI spec and Go SDK -make generate-all - -# 5. Test the API -curl http://localhost:3000/networks +```bash +# From portal-db directory +make postgrest-up ``` -## ๐Ÿ“‹ Table of Contents - -- [Overview](#overview) -- [Architecture](#architecture) -- [Getting Started](#getting-started) -- [API Endpoints](#api-endpoints) -- [Authentication](#authentication) -- [SDK Generation](#sdk-generation) -- [Development](#development) -- [Deployment](#deployment) -- [Troubleshooting](#troubleshooting) - -## ๐Ÿ” Overview - -This PostgREST API provides: +This starts: +- **PostgreSQL**: Database with Portal schema +- **PostgREST**: API server on http://localhost:3000 -- **Automatic REST API** generation from your PostgreSQL schema -- **Type-safe Go SDK** with automatic code generation -- **OpenAPI 3.0 specification** for integration -- **Row-level security** for data access control -- **JWT authentication** for secure access -- **CORS support** for web applications +### 2. Hydrate the database with test data -### Key Features - -- โœ… **Zero-code API generation** - PostgREST introspects your database schema -- โœ… **Secure by default** - Row-level security policies protect sensitive data -- โœ… **Standards-compliant** - OpenAPI 3.0 specification (converted from Swagger 2.0) -- โœ… **Go SDK generation** - Type-safe client using oapi-codegen -- โœ… **Rich querying** - Filtering, sorting, pagination, and joins -- โœ… **Docker-based deployment** - Easy containerized setup - -## ๐Ÿ—๏ธ Architecture - -``` -โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” -โ”‚ Client Apps โ”‚ โ”‚ Go SDK โ”‚ -โ”‚ (HTTP clients) โ”‚ โ”‚ (Type-safe) โ”‚ -โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ - โ”‚ โ”‚ - โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” - โ”‚ โ”‚ - โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ - โ”‚ PostgREST API โ”‚ โ”‚ - โ”‚ (Port 3000) โ”‚ โ”‚ - โ”‚ OpenAPI 3.0 Spec โ”‚ โ”‚ - โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ - โ”‚ โ”‚ - โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ - โ”‚ PostgreSQL Database โ”‚ โ”‚ - โ”‚ Portal DB (Port 5435) โ”‚ โ”‚ - โ”‚ Row-Level Security โ”‚ โ”‚ - โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ - โ”‚ - โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ - โ”‚ oapi-codegen โ”‚ โ”‚ - โ”‚ SDK Generation Tool โ”‚โ—„โ”€โ”€โ”€โ”˜ - โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +Hydrate the database with test data: +```bash +make hydrate-testdata ``` -### Components - -- **PostgREST**: Auto-generates REST API from PostgreSQL schema -- **PostgreSQL**: Portal database with row-level security policies -- **oapi-codegen**: Generates type-safe Go SDK from OpenAPI specification -- **OpenAPI 3.0**: API specification (converted from PostgREST's Swagger 2.0) - -## ๐ŸŽฏ Getting Started - -### Prerequisites - -- Docker and Docker Compose [[memory:8858267]] -- Make (for convenient commands) -- Node.js (for OpenAPI conversion): `brew install node` -- Go 1.22+ (for SDK generation): `brew install go` -- Your portal database running (see [parent README](../README.md)) +### 3. Test the API -### Installation - -1. **Start the portal database** (if not already running): - ```bash - cd .. && make portal_db_up - ``` - -2. **Set up API database roles**: - ```bash - make setup-db - ``` - -3. **Start the API services**: - ```bash - make postgrest-up - ``` - -4. **Verify the setup**: - ```bash - # Test API endpoint - curl http://localhost:3000/networks - ``` - -### Services URLs - -- **PostgreSQL Database**: `localhost:5435` -- **PostgREST API**: http://localhost:3000 -- **OpenAPI Specification**: http://localhost:3000/ (with `Accept: application/openapi+json`) - -## ๐ŸŒ API Endpoints - -### Public Endpoints (No Authentication Required) - -| Method | Endpoint | Description | -| ------ | -------------------- | ---------------------------------- | -| `GET` | `/networks` | List all supported networks | -| `GET` | `/services` | List all available services | -| `GET` | `/portal_plans` | List all portal subscription plans | -| `GET` | `/service_endpoints` | List service endpoint types | - -### Protected Endpoints (Authentication Required) - -| Method | Endpoint | Description | -| ------ | --------------------------------- | ----------------------------------------- | -| `GET` | `/organizations` | List organizations (filtered by access) | -| `GET` | `/portal_accounts` | List portal accounts (user's access only) | -| `GET` | `/portal_applications` | List applications (user's access only) | -| `POST` | `/portal_applications` | Create new application | -| `PUT` | `/portal_applications?id=eq.{id}` | Update application | -| `GET` | `/api/current_user_info` | Get current user information | -| `GET` | `/api/user_accounts` | Get user's accessible accounts | -| `GET` | `/api/user_applications` | Get user's accessible applications | - -### Query Features - -PostgREST provides powerful querying capabilities: - -#### Basic Filtering ```bash -# Get only active services -curl "http://localhost:3000/services?active=eq.true" - -# Get Ethereum mainnet service specifically -curl "http://localhost:3000/services?service_id=eq.ethereum-mainnet" - -# Get services with compute units greater than 1 -curl "http://localhost:3000/services?compute_units_per_relay=gt.1" +# View all networks (public data) +curl http://localhost:3000/networks -# Get services using pattern matching -curl "http://localhost:3000/services?service_name=ilike.*Ethereum*" +# View API documentation +curl http://localhost:3000/ | jq ``` -#### Field Selection & Sorting -```bash -# Select only specific fields -curl "http://localhost:3000/services?select=service_id,service_name,active" +### 4. Generate Go SDK -# Sort by service name ascending -curl "http://localhost:3000/services?order=service_name.asc" +**๐Ÿ’ก TODO_NEXT(@commoddity): Add Typescript SDK Generation to the Portal DB / PostgREST folder** -# Sort by multiple fields -curl "http://localhost:3000/services?order=active.desc,service_name.asc" +```bash +# Generate OpenAPI spec and Go client +make generate-all ``` -#### Pagination & Counting -```bash -# Paginate results (limit 2, skip first 2) -curl "http://localhost:3000/services?limit=2&offset=2" +### 5. Use the Go SDK -# Get total count in response header -curl -I -H "Prefer: count=exact" "http://localhost:3000/services" +```go +import "github.com/grove/path/portal-db/sdk/go" -# Get count with results -curl -H "Prefer: count=exact" "http://localhost:3000/services" +client, _ := portaldb.NewClientWithResponses("http://localhost:3000") +networks, _ := client.GetNetworksWithResponse(context.Background(), nil) ``` -#### Advanced Filtering -```bash -# Multiple conditions (AND) -curl "http://localhost:3000/services?active=eq.true&compute_units_per_relay=eq.1" - -# OR conditions -curl "http://localhost:3000/services?or=(service_id.eq.ethereum-mainnet,service_id.eq.polygon-mainnet)" - -# NULL checks -curl "http://localhost:3000/services?service_owner_address=is.null" +# Table of Contents + +- [Portal Database API](#portal-database-api) + - [๐Ÿค” What is This?](#-what-is-this) + - [๐Ÿ—๏ธ How it Works](#๏ธ-how-it-works) + - [๐Ÿ“ Folder Structure](#-folder-structure) + - [โš™๏ธ Configuration](#๏ธ-configuration) + - [PostgREST Configuration (`postgrest/postgrest.conf`)](#postgrest-configuration-postgrestpostgrestconf) + - [Database Roles (`postgrest/init.sql`)](#database-roles-postgrestinitsql) + - [๐Ÿ” Authentication](#-authentication) + - [How JWT Authentication Works](#how-jwt-authentication-works) + - [Generate JWT Tokens](#generate-jwt-tokens) + - [Use JWT Tokens](#use-jwt-tokens) + - [Permission Levels](#permission-levels) + - [Test Authentication](#test-authentication) + - [๐Ÿ› ๏ธ Go SDK Generation](#๏ธ-go-sdk-generation) + - [Generate SDK](#generate-sdk) + - [Generated Files](#generated-files) + - [Use the Go SDK](#use-the-go-sdk) + - [๐Ÿ”ง Development](#-development) + - [Available Commands](#available-commands) + - [After Database Schema Changes](#after-database-schema-changes) + - [Query Features Examples](#query-features-examples) + - [๐Ÿš€ Next Steps](#-next-steps) + - [For Beginners](#for-beginners) + - [๐Ÿ“š Resources](#-resources) + + +## ๐Ÿค” What is This? + +**PostgREST** is a tool that reads your PostgreSQL database and automatically generates a complete REST API. No code required - it introspects your tables, views, and functions to create endpoints. + +**This folder provides:** +- โœ… **PostgREST Configuration**: Database connection, JWT auth, and API settings +- โœ… **JWT Authentication**: Role-based access control using database roles +- โœ… **Go SDK Generation**: Type-safe Go client from the OpenAPI specification +- โœ… **Testing Scripts**: JWT token generation and authentication testing + +## ๐Ÿ—๏ธ How it Works -# Array operations -curl "http://localhost:3000/services?service_domains=cs.{eth-mainnet.gateway.pokt.network}" +``` +Database Schema โ†’ PostgREST โ†’ OpenAPI Spec โ†’ Go SDK + โ”‚ โ”‚ โ”‚ โ”‚ + Tables Auto-gen Endpoints Type-safe + Views OpenAPI + Auth Client + Functions Spec CRUD ops ``` -#### Resource Embedding (JOINs) -```bash -# Get services with their endpoints -curl "http://localhost:3000/services?select=service_id,service_name,service_endpoints(endpoint_type)" +1. **Database Schema**: Your PostgreSQL tables, views, and functions +2. **PostgREST**: Reads schema and creates REST endpoints automatically +3. **OpenAPI Spec**: PostgREST generates API documentation +4. **Go SDK**: Generated from OpenAPI spec for type-safe client code -# Get services with fallback URLs -curl "http://localhost:3000/services?select=*,service_fallbacks(fallback_url)" +## ๐Ÿ“ Folder Structure -# Get portal plans with accounts count -curl "http://localhost:3000/portal_plans?select=*,portal_accounts(count)" ``` - -#### Aggregation -```bash -# Count services by status -curl "http://localhost:3000/services?select=active,count=exact&group_by=active" - -# Get unique endpoint types -curl "http://localhost:3000/service_endpoints?select=endpoint_type&group_by=endpoint_type" +api/ +โ”œโ”€โ”€ postgrest/ # PostgREST configuration +โ”‚ โ”œโ”€โ”€ postgrest.conf # Main PostgREST config file +โ”‚ โ””โ”€โ”€ init.sql # **Database** roles and JWT setup +โ”œโ”€โ”€ scripts/ # Helper scripts +โ”‚ โ”œโ”€โ”€ gen-jwt.sh # Generate JWT tokens for testing +โ”‚ โ””โ”€โ”€ test-auth.sh # Test authentication flow +โ”œโ”€โ”€ codegen/ # SDK generation configuration +โ”‚ โ”œโ”€โ”€ codegen-*.yaml # oapi-codegen config files +โ”‚ โ”œโ”€โ”€ generate-openapi.sh # OpenAPI specification generation scripts +โ”‚ โ””โ”€โ”€ generate-sdks.sh # SDK generation scripts +โ”œโ”€โ”€ openapi/ # Generated API documentation +โ”‚ โ””โ”€โ”€ openapi.json # OpenAPI 3.0 specification +โ””โ”€โ”€ README.md # This file ``` -For complete query syntax, see [PostgREST Documentation](https://postgrest.org/en/stable/api.html). +## โš™๏ธ Configuration -## ๐Ÿ“‹ Practical Examples +### PostgREST Configuration (`postgrest/postgrest.conf`) -### CRUD Operations +Key settings for PostgREST: -#### Creating Resources (POST) -```bash -# Create a new service fallback -curl -X POST http://localhost:3000/service_fallbacks \ - -H "Content-Type: application/json" \ - -d '{ - "service_id": "ethereum-mainnet", - "fallback_url": "https://eth-mainnet.alchemy.com/v2/fallback" - }' - -# Create a new service endpoint -curl -X POST http://localhost:3000/service_endpoints \ - -H "Content-Type: application/json" \ - -d '{ - "service_id": "base-mainnet", - "endpoint_type": "REST" - }' - -# Create with return preference (get created object back) -curl -X POST http://localhost:3000/service_fallbacks \ - -H "Content-Type: application/json" \ - -H "Prefer: return=representation" \ - -d '{ - "service_id": "polygon-mainnet", - "fallback_url": "https://polygon-mainnet.nodereal.io/v1/fallback" - }' -``` +```ini +# Database connection +db-uri = "postgresql://authenticator:password@postgres:5432/portal_db" +db-schemas = "public,api" # Schemas to expose via API +db-anon-role = "anon" # Default role for unauthenticated requests -#### Reading Resources (GET) -```bash -# Basic reads -curl "http://localhost:3000/services" -curl "http://localhost:3000/networks" -curl "http://localhost:3000/portal_plans" - -# Filtered reads with practical filters -curl "http://localhost:3000/services?active=eq.true&select=service_id,service_name" -curl "http://localhost:3000/portal_plans?plan_usage_limit=not.is.null" -curl "http://localhost:3000/service_endpoints?endpoint_type=eq.JSON-RPC" - -# Complex queries -curl "http://localhost:3000/services?select=service_id,service_name,service_endpoints(endpoint_type),service_fallbacks(fallback_url)&active=eq.true" -``` +# JWT Authentication +jwt-secret = "your-secret-key" # Secret for verifying JWT tokens +jwt-role-claim-key = ".role" # JWT claim containing database role -#### Updating Resources (PATCH) -```bash -# Enable a service -curl -X PATCH "http://localhost:3000/services?service_id=eq.base-mainnet" \ - -H "Content-Type: application/json" \ - -d '{"active": true}' - -# Update service with multiple fields -curl -X PATCH "http://localhost:3000/services?service_id=eq.arbitrum-one" \ - -H "Content-Type: application/json" \ - -d '{ - "quality_fallback_enabled": true, - "hard_fallback_enabled": true - }' - -# Update with return preference -curl -X PATCH "http://localhost:3000/services?service_id=eq.polygon-mainnet" \ - -H "Content-Type: application/json" \ - -H "Prefer: return=representation" \ - -d '{"compute_units_per_relay": 2}' +# Server settings +server-host = "0.0.0.0" +server-port = 3000 ``` -#### Deleting Resources (DELETE) -```bash -# Delete specific fallback -curl -X DELETE "http://localhost:3000/service_fallbacks?service_id=eq.ethereum-mainnet&fallback_url=eq.https://eth-mainnet.alchemy.com/v2/fallback" +### Database Roles (`postgrest/init.sql`) -# Delete with conditions -curl -X DELETE "http://localhost:3000/service_endpoints?service_id=eq.base-mainnet&endpoint_type=eq.REST" -``` + -### Response Format Examples +| Role | Purpose | Permissions | +| --------------- | ------------------------- | ------------------------------------- | +| `authenticator` | PostgREST connection role | Can switch to other roles | +| `anon` | Anonymous users | Public data only (networks, services) | +| `authenticated` | Logged-in users | User data (accounts, applications) | -#### JSON (Default) -```bash -curl "http://localhost:3000/services?limit=1" -# Returns: [{"service_id":"ethereum-mainnet","service_name":"Ethereum Mainnet",...}] -``` +## ๐Ÿ” Authentication -#### CSV Format -```bash -curl -H "Accept: text/csv" "http://localhost:3000/services?select=service_id,service_name,active" -# Returns: CSV formatted data -``` +### How JWT Authentication Works -#### Single Object (Not Array) -```bash -curl -H "Accept: application/vnd.pgrst.object+json" \ - "http://localhost:3000/services?service_id=eq.ethereum-mainnet" -# Returns: {"service_id":"ethereum-mainnet",...} (object, not array) +``` +1. Generate JWT Token (external) + โ”œโ”€โ”€ Role: "authenticated" + โ”œโ”€โ”€ Email: "user@example.com" + โ””โ”€โ”€ Secret: Shared with PostgREST + +2. Client Request + โ””โ”€โ”€ Header: Authorization: Bearer + +3. PostgREST Processing (happens automatically) + โ”œโ”€โ”€ Verify JWT signature + โ”œโ”€โ”€ Extract 'role' claim + โ”œโ”€โ”€ Execute: SET ROLE ; + โ””โ”€โ”€ Run query with role permissions + +4. Database Query + โ””โ”€โ”€ Permissions enforced by PostgreSQL roles ``` -### Business Logic Examples +### Generate JWT Tokens -#### Get Complete Service Information ```bash -# Get service with all related data -curl "http://localhost:3000/services?select=*,service_endpoints(*),service_fallbacks(*)&service_id=eq.ethereum-mainnet" +make gen-jwt ``` -#### Portal Analytics Queries -```bash -# Count services by network -curl "http://localhost:3000/services?select=network_id,count=exact&group_by=network_id" - -# Get plan distribution -curl "http://localhost:3000/portal_accounts?select=portal_plan_type,count=exact&group_by=portal_plan_type" - -# List all endpoint types available -curl "http://localhost:3000/service_endpoints?select=endpoint_type&group_by=endpoint_type" +**Example Output:** ``` - -#### Health Check Queries -```bash -# Check API connectivity -curl -I "http://localhost:3000/networks" - -# Verify data integrity -curl "http://localhost:3000/services?select=count=exact&active=eq.true" - -# Get system overview -curl "http://localhost:3000/?select=*" | jq '.paths | keys' +๐Ÿ”‘ JWT Token Generated โœจ +๐Ÿ‘ค Role: authenticated +๐Ÿ“ง Email: john@doe.com +๐ŸŽŸ๏ธ Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... ``` -### Error Handling Examples +### Use JWT Tokens -#### Testing Error Responses ```bash -# Invalid table -curl "http://localhost:3000/nonexistent" -# Returns: 404 with error details - -# Invalid column -curl "http://localhost:3000/services?invalid_column=eq.test" -# Returns: 400 with column error - -# Invalid data type -curl -X POST "http://localhost:3000/services" \ - -H "Content-Type: application/json" \ - -d '{"service_id": 123}' -# Returns: 400 with type validation error - -# Constraint violation -curl -X POST "http://localhost:3000/services" \ - -H "Content-Type: application/json" \ - -d '{"service_id": "test", "service_domains": []}' -# Returns: 400 with constraint error -``` +# Set token as variable (from script output) +TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." -## ๐Ÿ” Authentication +# Access protected endpoints +curl -H "Authorization: Bearer $TOKEN" \ + http://localhost:3000/portal_accounts -### JWT Authentication +# Get current user info from JWT claims +curl -X POST -H "Authorization: Bearer $TOKEN" \ + http://localhost:3000/rpc/me +``` -The API supports JWT (JSON Web Token) authentication for secure access to protected endpoints. +### Permission Levels -#### Using a Token +**Anonymous (`anon` role)** +- โœ… `networks` - Blockchain networks +- โœ… `services` - Available services +- โœ… `portal_plans` - Subscription plans +- โŒ User accounts or private data -Include the JWT token in the `Authorization` header: +**Authenticated (`authenticated` role)** +- โœ… All anonymous permissions +- โœ… `organizations` - Organization data +- โœ… `portal_accounts` - User accounts +- โœ… `portal_applications` - User applications + +### Test Authentication ```bash -curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \ - http://localhost:3000/portal_accounts +# Run complete authentication test suite +make test-auth ``` -**Note**: JWT token generation and validation would need to be implemented separately or integrated with your existing authentication system. +This tests: +- Anonymous access to public data +- JWT token generation +- Authenticated access to protected data +- JWT claims access via `/rpc/me` -### Row-Level Security (RLS) +## ๐Ÿ› ๏ธ Go SDK Generation -The API implements PostgreSQL Row-Level Security to ensure users can only access their own data: +### Generate SDK -- **Users** can only view/edit their own profile -- **Portal Accounts** are filtered by user membership -- **Applications** are filtered by account access -- **Admin users** have elevated permissions - -## ๐Ÿ› ๏ธ SDK Generation - -### Automatic Generation - -Generate the OpenAPI specification and type-safe Go SDK: +When the PostgREST API is running on port `3000`, you can generate the Go SDK using the following command: ```bash # Generate both OpenAPI spec and Go SDK make generate-all # Or generate individually -make generate-openapi # Generate OpenAPI specification -make generate-sdks # Generate Go SDK +make generate-openapi # OpenAPI specification only +make generate-sdks # Go SDK only +``` + +### Generated Files + +``` +sdk/go/ +โ”œโ”€โ”€ models.go # Data types and structures (generated) +โ”œโ”€โ”€ client.go # API client and methods (generated) +โ”œโ”€โ”€ go.mod # Go module definition (permanent) +โ””โ”€โ”€ README.md # SDK documentation (permanent) ``` -### Go SDK Usage +### Use the Go SDK +**Basic Usage:** ```go package main import ( "context" - "fmt" - "net/http" - portaldb "github.com/grove/path/portal-db/sdk/go" ) func main() { - // Create client with typed responses - client, err := portaldb.NewClientWithResponses("http://localhost:3000") - if err != nil { - panic(err) - } - - ctx := context.Background() - - // Example 1: Get all active services - resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ - Active: &[]string{"eq.true"}[0], - }) - if err != nil { - panic(err) - } - - if resp.StatusCode() == 200 && resp.JSON200 != nil { - services := *resp.JSON200 - fmt.Printf("Found %d active services:\n", len(services)) - for _, service := range services { - fmt.Printf("- %s (%s)\n", service.ServiceName, service.ServiceId) - } - } - - // Example 2: Get specific service with endpoints - serviceResp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ - ServiceId: &[]string{"eq.ethereum-mainnet"}[0], - Select: &[]string{"*,service_endpoints(endpoint_type)"}[0], - }) - if err != nil { - panic(err) - } - - if serviceResp.StatusCode() == 200 && serviceResp.JSON200 != nil { - service := (*serviceResp.JSON200)[0] - fmt.Printf("Service: %s supports endpoints: %v\n", - service.ServiceName, service.ServiceEndpoints) - } -} - -// Example with authentication -func authenticatedExample() { - token := "your-jwt-token" - + // Create client client, err := portaldb.NewClientWithResponses("http://localhost:3000") if err != nil { panic(err) } - ctx := context.Background() - - // Add JWT token to requests - requestEditor := func(ctx context.Context, req *http.Request) error { - req.Header.Set("Authorization", "Bearer "+token) - return nil - } - - // Make authenticated request - resp, err := client.GetPortalAccountsWithResponse(ctx, - &portaldb.GetPortalAccountsParams{}, requestEditor) + // Get all networks + networks, err := client.GetNetworksWithResponse(context.Background(), nil) if err != nil { panic(err) } - if resp.StatusCode() == 200 && resp.JSON200 != nil { - accounts := *resp.JSON200 - fmt.Printf("User has access to %d accounts\n", len(accounts)) + // Print results + for _, network := range *networks.JSON200 { + fmt.Printf("Network: %s\n", network.NetworkId) } } ``` -**For complete Go SDK documentation, see [SDK README](../sdk/go/README.md)** - - - - - - - - - - +**With Authentication:** +```go +// JWT token from gen-jwt.sh +token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." -## ๐Ÿ”ง Development +// Request editor to add auth header +requestEditor := func(ctx context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil +} -### Development Environment +// Make authenticated request +accounts, err := client.GetPortalAccountsWithResponse( + context.Background(), + &portaldb.GetPortalAccountsParams{}, + requestEditor, +) +``` -Start a full development environment with all services: +For complete Go SDK documentation, see [`sdk/go/README.md`](../sdk/go/README.md). -```bash -make postgrest-up # Starts PostgREST and PostgreSQL services -``` +## ๐Ÿ”ง Development ### Available Commands -| Command | Description | -| ---------------------- | ----------------------------------- | -| `make postgrest-up` | Start PostgREST and PostgreSQL | -| `make postgrest-down` | Stop PostgREST and PostgreSQL | -| `make postgrest-logs` | Show service logs | -| `make setup-db` | Set up database roles and permissions | -| `make generate-openapi`| Generate OpenAPI specification | -| `make generate-sdks` | Generate Go SDK from OpenAPI spec | -| `make generate-all` | Generate both OpenAPI spec and SDKs | - -### Database Schema Changes - -When you modify the database schema: - -1. **Update the schema** in `../schema/001_schema.sql` -2. **Restart the database**: - ```bash - cd .. && make portal_db_clean && make portal_db_up - ``` -3. **Reapply API setup**: - ```bash - make setup-db - ``` -4. **Regenerate SDKs**: - ```bash - make generate-all - ``` - -## ๐Ÿš€ Deployment - -### Production Considerations - -1. **Security**: - - Change default JWT secrets - - Use environment-specific configuration - - Enable HTTPS/TLS - - Configure proper CORS origins - -2. **Performance**: - - Tune PostgreSQL connection pool - - Add API rate limiting - - Configure caching headers - - Monitor database performance - -3. **Monitoring**: - - Add health checks - - Configure logging - - Set up metrics collection - - Monitor API response times - -### Container Deployment - -The API can be deployed using the provided Docker Compose setup: - ```bash -# Production deployment -docker compose -f docker-compose.yml up -d -``` +# Start PostgREST and PostgreSQL +make postgrest-up -### Kubernetes Deployment +# Stop services +make postgrest-down -For Kubernetes deployment, create appropriate manifests based on the Docker Compose configuration. Consider using your existing Helm charts pattern. +# View logs +make postgrest-logs -## ๐Ÿ” Troubleshooting +# Generate SDK after schema changes +make generate-all -### Common Issues +# Test authentication +make test-auth -#### API Not Starting +# Populate with test data +make hydrate-testdata +``` -```bash -# Check if portal database is running -docker ps | grep path-portal-db +### After Database Schema Changes -# Check PostgREST logs -make api-logs +When you modify tables or add new functions: -# Verify database connection -make test-api -``` +1. **Update schema**: Edit `../schema/001_schema.sql` +2. **Restart database**: `make postgrest-down && make postgrest-up` +3. **Regenerate SDK**: `make generate-all` -#### Authentication Issues +### Query Features Examples +**Filtering:** ```bash -# Verify auth service is running -curl http://localhost:3001/health - -# Check JWT token validity -curl -X POST http://localhost:3001/auth/verify \ - -H "Content-Type: application/json" \ - -d '{"token":"YOUR_TOKEN"}' +curl "http://localhost:3000/services?active=eq.true" +curl "http://localhost:3000/services?service_name=ilike.*Ethereum*" ``` -#### Permission Errors - +**Field Selection:** ```bash -# Reapply database setup -make setup-db - -# Check user permissions in database -psql postgresql://portal_user:portal_password@localhost:5435/portal_db \ - -c "SELECT * FROM portal_users WHERE portal_user_email = 'your-email@example.com';" +curl "http://localhost:3000/services?select=service_id,service_name" ``` -### Useful Commands +**Sorting & Pagination:** +```bash +curl "http://localhost:3000/services?order=service_name.asc&limit=10&offset=20" +``` +**Joins (Resource Embedding):** ```bash -# View all available routes -curl http://localhost:3000/ +curl "http://localhost:3000/services?select=*,service_endpoints(*)" +``` -# Check database connection -curl http://localhost:3000/networks +For complete query syntax, see [PostgREST API Documentation](https://postgrest.org/en/stable/api.html). -# Test authentication -curl -H "Authorization: Bearer YOUR_TOKEN" \ - http://localhost:3000/portal_accounts +## ๐Ÿš€ Next Steps -# View OpenAPI specification -curl -H "Accept: application/openapi+json" \ - http://localhost:3000/ -``` +### For Beginners +1. **Explore the API**: Try the curl examples above +2. **Generate SDK**: Run `make generate-all` +3. **Read Go SDK docs**: Check `../sdk/go/README.md` +4. **Test authentication**: Run `make test-auth` +5. **Add test data**: Run `make hydrate-testdata` -## ๐Ÿ“š Additional Resources +## ๐Ÿ“š Resources - [PostgREST Documentation](https://postgrest.org/en/stable/) - [PostgreSQL Row Level Security](https://www.postgresql.org/docs/current/ddl-rowsecurity.html) -- [OpenAPI Specification](https://swagger.io/specification/) - [JWT.io](https://jwt.io/) - JWT token debugging - - - - - - - -## ๐Ÿค Contributing - -When contributing to the API: - -1. Update documentation for any new endpoints -2. Regenerate SDKs after schema changes -3. Test both authenticated and public endpoints -4. Update this README for any new features - -## ๐Ÿ“„ License - -This API setup is part of the Grove PATH project. See the main project license for details. +- [OpenAPI Specification](https://swagger.io/specification/) diff --git a/portal-db/api/codegen/generate-openapi.sh b/portal-db/api/codegen/generate-openapi.sh index f255fdcb7..9ab263770 100755 --- a/portal-db/api/codegen/generate-openapi.sh +++ b/portal-db/api/codegen/generate-openapi.sh @@ -37,9 +37,21 @@ while [ $attempt -le $max_attempts ]; do ((attempt++)) done +# Generate JWT token for authenticated access to get all endpoints +echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." +JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) + +if [ -z "$JWT_TOKEN" ]; then + echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." + AUTH_HEADER="" +else + echo "โœ… JWT token generated, will fetch all endpoints (public + protected)" + AUTH_HEADER="Authorization: Bearer $JWT_TOKEN" +fi + # Fetch OpenAPI specification echo "๐Ÿ“ฅ Fetching OpenAPI specification..." -if curl -s -f -H "Accept: application/openapi+json" "$POSTGREST_URL/" > "$OUTPUT_FILE"; then +if curl -s -f -H "Accept: application/openapi+json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} "$POSTGREST_URL/" > "$OUTPUT_FILE"; then echo "โœ… OpenAPI specification saved to: $OUTPUT_FILE" # Pretty print the JSON @@ -59,6 +71,11 @@ if curl -s -f -H "Accept: application/openapi+json" "$POSTGREST_URL/" > "$OUTPUT echo " API version: $(jq -r '.info.version // "unknown"' "$OUTPUT_FILE")" echo " Number of paths: $(jq -r '.paths | length' "$OUTPUT_FILE")" echo " Number of schemas: $(jq -r '.components.schemas | length' "$OUTPUT_FILE")" + + # Log the actual paths that were retrieved + echo "" + echo "๐Ÿ” Retrieved API Paths:" + jq -r '.paths | keys[]' "$OUTPUT_FILE" | sed 's/^/ โ€ข /' fi echo "" diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 9485365b6..9e67f72c0 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -99,9 +99,21 @@ mkdir -p "$OPENAPI_DIR" echo "๐Ÿงน Cleaning previous OpenAPI files..." rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" +# Generate JWT token for authenticated access to get all endpoints +echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." +JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) + +if [ -z "$JWT_TOKEN" ]; then + echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." + AUTH_HEADER="" +else + echo "โœ… JWT token generated, will fetch all endpoints (public + protected)" + AUTH_HEADER="Authorization: Bearer $JWT_TOKEN" +fi + # Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." -if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" > "$OPENAPI_V2_FILE"; then +if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" exit 1 fi diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index e8da6b120..d649ca8ab 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -378,47 +378,35 @@ ] } }, - "/services": { + "/applications": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + "$ref": "#/components/parameters/rowFilter.applications.application_address" }, { - "$ref": "#/components/parameters/rowFilter.services.network_id" + "$ref": "#/components/parameters/rowFilter.applications.gateway_address" }, { - "$ref": "#/components/parameters/rowFilter.services.active" + "$ref": "#/components/parameters/rowFilter.applications.service_id" }, { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_amount" }, { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_denom" }, { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" + "$ref": "#/components/parameters/rowFilter.applications.application_private_key_hex" }, { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" + "$ref": "#/components/parameters/rowFilter.applications.network_id" }, { - "$ref": "#/components/parameters/rowFilter.services.created_at" + "$ref": "#/components/parameters/rowFilter.applications.created_at" }, { - "$ref": "#/components/parameters/rowFilter.services.updated_at" + "$ref": "#/components/parameters/rowFilter.applications.updated_at" }, { "$ref": "#/components/parameters/select" @@ -449,7 +437,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/applications" }, "type": "array" } @@ -457,7 +445,7 @@ "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { "items": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/applications" }, "type": "array" } @@ -465,7 +453,7 @@ "application/vnd.pgrst.object+json": { "schema": { "items": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/applications" }, "type": "array" } @@ -473,7 +461,7 @@ "text/csv": { "schema": { "items": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/applications" }, "type": "array" } @@ -484,9 +472,9 @@ "description": "Partial Content" } }, - "summary": "Supported blockchain services from the Pocket Network", + "summary": "Onchain applications for processing relays through the network", "tags": [ - "services" + "applications" ] }, "post": { @@ -499,58 +487,46 @@ } ], "requestBody": { - "$ref": "#/components/requestBodies/services" + "$ref": "#/components/requestBodies/applications" }, "responses": { "201": { "description": "Created" } }, - "summary": "Supported blockchain services from the Pocket Network", + "summary": "Onchain applications for processing relays through the network", "tags": [ - "services" + "applications" ] }, "delete": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + "$ref": "#/components/parameters/rowFilter.applications.application_address" }, { - "$ref": "#/components/parameters/rowFilter.services.network_id" + "$ref": "#/components/parameters/rowFilter.applications.gateway_address" }, { - "$ref": "#/components/parameters/rowFilter.services.active" + "$ref": "#/components/parameters/rowFilter.applications.service_id" }, { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_amount" }, { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_denom" }, { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" + "$ref": "#/components/parameters/rowFilter.applications.application_private_key_hex" }, { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" + "$ref": "#/components/parameters/rowFilter.applications.network_id" }, { - "$ref": "#/components/parameters/rowFilter.services.created_at" + "$ref": "#/components/parameters/rowFilter.applications.created_at" }, { - "$ref": "#/components/parameters/rowFilter.services.updated_at" + "$ref": "#/components/parameters/rowFilter.applications.updated_at" }, { "$ref": "#/components/parameters/preferReturn" @@ -561,75 +537,102 @@ "description": "No Content" } }, - "summary": "Supported blockchain services from the Pocket Network", + "summary": "Onchain applications for processing relays through the network", "tags": [ - "services" + "applications" ] }, "patch": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + "$ref": "#/components/parameters/rowFilter.applications.application_address" }, { - "$ref": "#/components/parameters/rowFilter.services.network_id" + "$ref": "#/components/parameters/rowFilter.applications.gateway_address" }, { - "$ref": "#/components/parameters/rowFilter.services.active" + "$ref": "#/components/parameters/rowFilter.applications.service_id" }, { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_amount" }, { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + "$ref": "#/components/parameters/rowFilter.applications.stake_denom" }, { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" + "$ref": "#/components/parameters/rowFilter.applications.application_private_key_hex" }, { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" + "$ref": "#/components/parameters/rowFilter.applications.network_id" }, { - "$ref": "#/components/parameters/rowFilter.services.created_at" + "$ref": "#/components/parameters/rowFilter.applications.created_at" }, { - "$ref": "#/components/parameters/rowFilter.services.updated_at" + "$ref": "#/components/parameters/rowFilter.applications.updated_at" }, { "$ref": "#/components/parameters/preferReturn" } ], "requestBody": { - "$ref": "#/components/requestBodies/services" + "$ref": "#/components/requestBodies/applications" }, "responses": { "204": { "description": "No Content" } }, - "summary": "Supported blockchain services from the Pocket Network", + "summary": "Onchain applications for processing relays through the network", "tags": [ - "services" + "applications" ] } }, - "/networks": { + "/portal_applications": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.networks.network_id" + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" }, { "$ref": "#/components/parameters/select" @@ -660,7 +663,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/networks" + "$ref": "#/components/schemas/portal_applications" }, "type": "array" } @@ -668,7 +671,7 @@ "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { "items": { - "$ref": "#/components/schemas/networks" + "$ref": "#/components/schemas/portal_applications" }, "type": "array" } @@ -676,7 +679,7 @@ "application/vnd.pgrst.object+json": { "schema": { "items": { - "$ref": "#/components/schemas/networks" + "$ref": "#/components/schemas/portal_applications" }, "type": "array" } @@ -684,7 +687,7 @@ "text/csv": { "schema": { "items": { - "$ref": "#/components/schemas/networks" + "$ref": "#/components/schemas/portal_applications" }, "type": "array" } @@ -695,9 +698,9 @@ "description": "Partial Content" } }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "summary": "Applications created within portal accounts with their own rate limits and settings", "tags": [ - "networks" + "portal_applications" ] }, "post": { @@ -710,22 +713,61 @@ } ], "requestBody": { - "$ref": "#/components/requestBodies/networks" + "$ref": "#/components/requestBodies/portal_applications" }, "responses": { "201": { "description": "Created" } }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "summary": "Applications created within portal accounts with their own rate limits and settings", "tags": [ - "networks" + "portal_applications" ] }, "delete": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.networks.network_id" + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" }, { "$ref": "#/components/parameters/preferReturn" @@ -736,51 +778,114 @@ "description": "No Content" } }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "summary": "Applications created within portal accounts with their own rate limits and settings", "tags": [ - "networks" + "portal_applications" ] }, "patch": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.networks.network_id" + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" }, { "$ref": "#/components/parameters/preferReturn" } ], "requestBody": { - "$ref": "#/components/requestBodies/networks" + "$ref": "#/components/requestBodies/portal_applications" }, "responses": { "204": { "description": "No Content" } }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "summary": "Applications created within portal accounts with their own rate limits and settings", "tags": [ - "networks" + "portal_applications" ] } }, - "/service_endpoints": { + "/services": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + "$ref": "#/components/parameters/rowFilter.services.service_id" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + "$ref": "#/components/parameters/rowFilter.services.service_name" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + "$ref": "#/components/parameters/rowFilter.services.service_domains" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" }, { "$ref": "#/components/parameters/select" @@ -811,7 +916,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/service_endpoints" + "$ref": "#/components/schemas/services" }, "type": "array" } @@ -819,7 +924,7 @@ "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { "items": { - "$ref": "#/components/schemas/service_endpoints" + "$ref": "#/components/schemas/services" }, "type": "array" } @@ -827,7 +932,7 @@ "application/vnd.pgrst.object+json": { "schema": { "items": { - "$ref": "#/components/schemas/service_endpoints" + "$ref": "#/components/schemas/services" }, "type": "array" } @@ -835,7 +940,7 @@ "text/csv": { "schema": { "items": { - "$ref": "#/components/schemas/service_endpoints" + "$ref": "#/components/schemas/services" }, "type": "array" } @@ -846,9 +951,9 @@ "description": "Partial Content" } }, - "summary": "Available endpoint types for each service", + "summary": "Supported blockchain services from the Pocket Network", "tags": [ - "service_endpoints" + "services" ] }, "post": { @@ -861,261 +966,1775 @@ } ], "requestBody": { - "$ref": "#/components/requestBodies/service_endpoints" + "$ref": "#/components/requestBodies/services" }, "responses": { "201": { "description": "Created" } }, - "summary": "Available endpoint types for each service", + "summary": "Supported blockchain services from the Pocket Network", "tags": [ - "service_endpoints" + "services" ] }, "delete": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + "$ref": "#/components/parameters/rowFilter.services.service_id" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + "$ref": "#/components/parameters/rowFilter.services.service_name" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + "$ref": "#/components/parameters/rowFilter.services.service_domains" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" }, { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + "$ref": "#/components/parameters/rowFilter.services.network_id" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + "$ref": "#/components/parameters/rowFilter.services.active" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" }, { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" }, { "$ref": "#/components/parameters/preferReturn" } ], "requestBody": { - "$ref": "#/components/requestBodies/service_endpoints" + "$ref": "#/components/requestBodies/services" }, "responses": { "204": { "description": "No Content" } }, - "summary": "Available endpoint types for each service", + "summary": "Supported blockchain services from the Pocket Network", "tags": [ - "service_endpoints" + "services" ] } - } - }, - "externalDocs": { - "description": "PostgREST Documentation", - "url": "https://postgrest.org/en/v12.0/api.html" - }, - "servers": [ - { - "url": "http://localhost:3000" - } - ], - "components": { - "parameters": { - "preferParams": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "params=single-object" - ] - } - }, - "preferReturn": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none" - ] - } + }, + "/portal_accounts": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] }, - "preferCount": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "count=none" - ] - } + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] }, - "preferPost": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none", - "resolution=ignore-duplicates", - "resolution=merge-duplicates" - ] + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + } + }, + "/organizations": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + } + }, + "/networks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + } + }, + "/gateways": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_address" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_amount" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_denom" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_private_key_hex" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/gateways" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/gateways" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/gateways" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/gateways" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Onchain gateway information including stake and network details", + "tags": [ + "gateways" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/gateways" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Onchain gateway information including stake and network details", + "tags": [ + "gateways" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_address" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_amount" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_denom" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_private_key_hex" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Onchain gateway information including stake and network details", + "tags": [ + "gateways" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_address" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_amount" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.stake_denom" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.gateway_private_key_hex" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.gateways.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/gateways" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Onchain gateway information including stake and network details", + "tags": [ + "gateways" + ] + } + }, + "/service_endpoints": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + } + }, + "/rpc/me": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) me" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "type": "object" + } + }, + "text/csv": { + "schema": { + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) me" + ] + } + } + }, + "externalDocs": { + "description": "PostgREST Documentation", + "url": "https://postgrest.org/en/v12.0/api.html" + }, + "servers": [ + { + "url": "http://localhost:3000" + } + ], + "components": { + "parameters": { + "preferParams": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "params=single-object" + ] + } + }, + "preferReturn": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none" + ] + } + }, + "preferCount": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "count=none" + ] + } + }, + "preferPost": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none", + "resolution=ignore-duplicates", + "resolution=merge-duplicates" + ] + } + }, + "select": { + "name": "select", + "description": "Filtering Columns", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "on_conflict": { + "name": "on_conflict", + "description": "On Conflict", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "order": { + "name": "order", + "description": "Ordering", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "range": { + "name": "Range", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string" + } + }, + "rangeUnit": { + "name": "Range-Unit", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string", + "default": "items" + } + }, + "offset": { + "name": "offset", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "limit": { + "name": "limit", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "rowFilter.service_fallbacks.service_fallback_id": { + "name": "service_fallback_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_fallbacks.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.fallback_url": { + "name": "fallback_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_fallbacks.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_plans.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.portal_plan_type_description": { + "name": "portal_plan_type_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.plan_usage_limit": { + "name": "plan_usage_limit", + "description": "Maximum usage allowed within the interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_usage_limit_interval": { + "name": "plan_usage_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_plans.plan_rate_limit_rps": { + "name": "plan_rate_limit_rps", + "description": "Rate limit in requests per second", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_application_limit": { + "name": "plan_application_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.applications.application_address": { + "name": "application_address", + "description": "Blockchain address of the application", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.gateway_address": { + "name": "gateway_address", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.stake_amount": { + "name": "stake_amount", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "bigint" + } + }, + "rowFilter.applications.stake_denom": { + "name": "stake_denom", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.application_private_key_hex": { + "name": "application_private_key_hex", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.applications.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.applications.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.portal_application_id": { + "name": "portal_application_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "rowFilter.portal_applications.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "rowFilter.portal_applications.portal_application_name": { + "name": "portal_application_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.emoji": { + "name": "emoji", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_application_user_limit": { + "name": "portal_application_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_interval": { + "name": "portal_application_user_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_rps": { + "name": "portal_application_user_limit_rps", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_description": { + "name": "portal_application_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.favorite_service_ids": { + "name": "favorite_service_ids", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.portal_applications.secret_key_hash": { + "name": "secret_key_hash", + "description": "Hashed secret key for application authentication", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.secret_key_required": { + "name": "secret_key_required", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.portal_applications.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.service_name": { + "name": "service_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.compute_units_per_relay": { + "name": "compute_units_per_relay", + "description": "Cost in compute units for each relay", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.services.service_domains": { + "name": "service_domains", + "description": "Valid domains for this service", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.services.service_owner_address": { + "name": "service_owner_address", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.active": { + "name": "active", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.quality_fallback_enabled": { + "name": "quality_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.hard_fallback_enabled": { + "name": "hard_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.svg_icon": { + "name": "svg_icon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" } }, - "select": { - "name": "select", - "description": "Filtering Columns", + "rowFilter.services.deleted_at": { + "name": "deleted_at", "required": false, "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "timestamp with time zone" } }, - "on_conflict": { - "name": "on_conflict", - "description": "On Conflict", + "rowFilter.services.created_at": { + "name": "created_at", "required": false, "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "timestamp with time zone" } }, - "order": { - "name": "order", - "description": "Ordering", + "rowFilter.services.updated_at": { + "name": "updated_at", "required": false, "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "timestamp with time zone" } }, - "range": { - "name": "Range", - "description": "Limiting and Pagination", + "rowFilter.portal_accounts.portal_account_id": { + "name": "portal_account_id", + "description": "Unique identifier for the portal account", "required": false, - "in": "header", + "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, - "rangeUnit": { - "name": "Range-Unit", - "description": "Limiting and Pagination", + "rowFilter.portal_accounts.organization_id": { + "name": "organization_id", "required": false, - "in": "header", + "in": "query", "schema": { "type": "string", - "default": "items" + "format": "integer" } }, - "offset": { - "name": "offset", - "description": "Limiting and Pagination", + "rowFilter.portal_accounts.portal_plan_type": { + "name": "portal_plan_type", "required": false, "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "character varying" } }, - "limit": { - "name": "limit", - "description": "Limiting and Pagination", + "rowFilter.portal_accounts.user_account_name": { + "name": "user_account_name", "required": false, "in": "query", "schema": { - "type": "string" + "type": "string", + "format": "character varying" } }, - "rowFilter.service_fallbacks.service_fallback_id": { - "name": "service_fallback_id", + "rowFilter.portal_accounts.internal_account_name": { + "name": "internal_account_name", "required": false, "in": "query", "schema": { "type": "string", - "format": "integer" + "format": "character varying" } }, - "rowFilter.service_fallbacks.service_id": { - "name": "service_id", + "rowFilter.portal_accounts.portal_account_user_limit": { + "name": "portal_account_user_limit", "required": false, "in": "query", "schema": { "type": "string", - "format": "character varying" + "format": "integer" } }, - "rowFilter.service_fallbacks.fallback_url": { - "name": "fallback_url", + "rowFilter.portal_accounts.portal_account_user_limit_interval": { + "name": "portal_account_user_limit_interval", "required": false, "in": "query", "schema": { "type": "string", - "format": "character varying" + "format": "public.plan_interval" } }, - "rowFilter.service_fallbacks.created_at": { - "name": "created_at", + "rowFilter.portal_accounts.portal_account_user_limit_rps": { + "name": "portal_account_user_limit_rps", "required": false, "in": "query", "schema": { "type": "string", - "format": "timestamp with time zone" + "format": "integer" } }, - "rowFilter.service_fallbacks.updated_at": { - "name": "updated_at", + "rowFilter.portal_accounts.billing_type": { + "name": "billing_type", "required": false, "in": "query", "schema": { "type": "string", - "format": "timestamp with time zone" + "format": "character varying" } }, - "rowFilter.portal_plans.portal_plan_type": { - "name": "portal_plan_type", + "rowFilter.portal_accounts.stripe_subscription_id": { + "name": "stripe_subscription_id", + "description": "Stripe subscription identifier for billing", "required": false, "in": "query", "schema": { @@ -1123,8 +2742,8 @@ "format": "character varying" } }, - "rowFilter.portal_plans.portal_plan_type_description": { - "name": "portal_plan_type_description", + "rowFilter.portal_accounts.gcp_account_id": { + "name": "gcp_account_id", "required": false, "in": "query", "schema": { @@ -1132,55 +2751,54 @@ "format": "character varying" } }, - "rowFilter.portal_plans.plan_usage_limit": { - "name": "plan_usage_limit", - "description": "Maximum usage allowed within the interval", + "rowFilter.portal_accounts.gcp_entitlement_id": { + "name": "gcp_entitlement_id", "required": false, "in": "query", "schema": { "type": "string", - "format": "integer" + "format": "character varying" } }, - "rowFilter.portal_plans.plan_usage_limit_interval": { - "name": "plan_usage_limit_interval", + "rowFilter.portal_accounts.deleted_at": { + "name": "deleted_at", "required": false, "in": "query", "schema": { "type": "string", - "format": "public.plan_interval" + "format": "timestamp with time zone" } }, - "rowFilter.portal_plans.plan_rate_limit_rps": { - "name": "plan_rate_limit_rps", - "description": "Rate limit in requests per second", + "rowFilter.portal_accounts.created_at": { + "name": "created_at", "required": false, "in": "query", "schema": { "type": "string", - "format": "integer" + "format": "timestamp with time zone" } }, - "rowFilter.portal_plans.plan_application_limit": { - "name": "plan_application_limit", + "rowFilter.portal_accounts.updated_at": { + "name": "updated_at", "required": false, "in": "query", "schema": { "type": "string", - "format": "integer" + "format": "timestamp with time zone" } }, - "rowFilter.services.service_id": { - "name": "service_id", + "rowFilter.organizations.organization_id": { + "name": "organization_id", "required": false, "in": "query", "schema": { "type": "string", - "format": "character varying" + "format": "integer" } }, - "rowFilter.services.service_name": { - "name": "service_name", + "rowFilter.organizations.organization_name": { + "name": "organization_name", + "description": "Name of the organization", "required": false, "in": "query", "schema": { @@ -1188,36 +2806,35 @@ "format": "character varying" } }, - "rowFilter.services.compute_units_per_relay": { - "name": "compute_units_per_relay", - "description": "Cost in compute units for each relay", + "rowFilter.organizations.deleted_at": { + "name": "deleted_at", + "description": "Soft delete timestamp", "required": false, "in": "query", "schema": { "type": "string", - "format": "integer" + "format": "timestamp with time zone" } }, - "rowFilter.services.service_domains": { - "name": "service_domains", - "description": "Valid domains for this service", + "rowFilter.organizations.created_at": { + "name": "created_at", "required": false, "in": "query", "schema": { "type": "string", - "format": "character varying[]" + "format": "timestamp with time zone" } }, - "rowFilter.services.service_owner_address": { - "name": "service_owner_address", + "rowFilter.organizations.updated_at": { + "name": "updated_at", "required": false, "in": "query", "schema": { "type": "string", - "format": "character varying" + "format": "timestamp with time zone" } }, - "rowFilter.services.network_id": { + "rowFilter.networks.network_id": { "name": "network_id", "required": false, "in": "query", @@ -1226,52 +2843,54 @@ "format": "character varying" } }, - "rowFilter.services.active": { - "name": "active", + "rowFilter.gateways.gateway_address": { + "name": "gateway_address", + "description": "Blockchain address of the gateway", "required": false, "in": "query", "schema": { "type": "string", - "format": "boolean" + "format": "character varying" } }, - "rowFilter.services.quality_fallback_enabled": { - "name": "quality_fallback_enabled", + "rowFilter.gateways.stake_amount": { + "name": "stake_amount", + "description": "Amount of tokens staked by the gateway", "required": false, "in": "query", "schema": { "type": "string", - "format": "boolean" + "format": "bigint" } }, - "rowFilter.services.hard_fallback_enabled": { - "name": "hard_fallback_enabled", + "rowFilter.gateways.stake_denom": { + "name": "stake_denom", "required": false, "in": "query", "schema": { "type": "string", - "format": "boolean" + "format": "character varying" } }, - "rowFilter.services.svg_icon": { - "name": "svg_icon", + "rowFilter.gateways.network_id": { + "name": "network_id", "required": false, "in": "query", "schema": { "type": "string", - "format": "text" + "format": "character varying" } }, - "rowFilter.services.deleted_at": { - "name": "deleted_at", + "rowFilter.gateways.gateway_private_key_hex": { + "name": "gateway_private_key_hex", "required": false, "in": "query", "schema": { "type": "string", - "format": "timestamp with time zone" + "format": "character varying" } }, - "rowFilter.services.created_at": { + "rowFilter.gateways.created_at": { "name": "created_at", "required": false, "in": "query", @@ -1280,7 +2899,7 @@ "format": "timestamp with time zone" } }, - "rowFilter.services.updated_at": { + "rowFilter.gateways.updated_at": { "name": "updated_at", "required": false, "in": "query", @@ -1289,15 +2908,6 @@ "format": "timestamp with time zone" } }, - "rowFilter.networks.network_id": { - "name": "network_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, "rowFilter.service_endpoints.endpoint_id": { "name": "endpoint_id", "required": false, @@ -1345,6 +2955,31 @@ } }, "requestBodies": { + "portal_accounts": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + } + }, + "description": "portal_accounts" + }, "networks": { "content": { "application/json": { @@ -1370,6 +3005,31 @@ }, "description": "networks" }, + "gateways": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gateways" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/gateways" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/gateways" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/gateways" + } + } + }, + "description": "gateways" + }, "service_endpoints": { "content": { "application/json": { @@ -1395,6 +3055,31 @@ }, "description": "service_endpoints" }, + "portal_applications": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + } + }, + "description": "portal_applications" + }, "service_fallbacks": { "content": { "application/json": { @@ -1429,46 +3114,96 @@ }, "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { - "$ref": "#/components/schemas/portal_plans" + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + } + }, + "description": "portal_plans" + }, + "applications": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/applications" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/applications" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/applications" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/applications" + } + } + }, + "description": "applications" + }, + "services": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/services" } }, "application/vnd.pgrst.object+json": { "schema": { - "$ref": "#/components/schemas/portal_plans" + "$ref": "#/components/schemas/services" } }, "text/csv": { "schema": { - "$ref": "#/components/schemas/portal_plans" + "$ref": "#/components/schemas/services" } } }, - "description": "portal_plans" + "description": "services" }, - "services": { + "organizations": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/organizations" } }, "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/organizations" } }, "application/vnd.pgrst.object+json": { "schema": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/organizations" } }, "text/csv": { "schema": { - "$ref": "#/components/schemas/services" + "$ref": "#/components/schemas/organizations" } } }, - "description": "services" + "description": "organizations" } }, "schemas": { @@ -1552,6 +3287,151 @@ }, "type": "object" }, + "applications": { + "description": "Onchain applications for processing relays through the network", + "required": [ + "application_address", + "gateway_address", + "service_id", + "network_id" + ], + "properties": { + "application_address": { + "description": "Blockchain address of the application\n\nNote:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "gateway_address": { + "description": "Note:\nThis is a Foreign Key to `gateways.gateway_address`.", + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "stake_amount": { + "format": "bigint", + "type": "integer" + }, + "stake_denom": { + "format": "character varying", + "maxLength": 15, + "type": "string" + }, + "application_private_key_hex": { + "format": "character varying", + "maxLength": 64, + "type": "string" + }, + "network_id": { + "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_applications": { + "description": "Applications created within portal accounts with their own rate limits and settings", + "required": [ + "portal_application_id", + "portal_account_id" + ], + "properties": { + "portal_application_id": { + "default": "gen_random_uuid()", + "description": "Note:\nThis is a Primary Key.", + "format": "uuid", + "type": "string" + }, + "portal_account_id": { + "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", + "format": "uuid", + "type": "string" + }, + "portal_application_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "emoji": { + "format": "character varying", + "maxLength": 16, + "type": "string" + }, + "portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_application_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "portal_application_description": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "secret_key_hash": { + "description": "Hashed secret key for application authentication", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "secret_key_required": { + "default": false, + + "type": "boolean" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, "services": { "description": "Supported blockchain services from the Pocket Network", "required": [ @@ -1632,6 +3512,131 @@ }, "type": "object" }, + "portal_accounts": { + "description": "Multi-tenant accounts with plans and billing integration", + "required": [ + "portal_account_id", + "portal_plan_type" + ], + "properties": { + "portal_account_id": { + "default": "gen_random_uuid()", + "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", + "format": "uuid", + "type": "string" + }, + "organization_id": { + "description": "Note:\nThis is a Foreign Key to `organizations.organization_id`.", + "format": "integer", + "type": "integer" + }, + "portal_plan_type": { + "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "user_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "internal_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_account_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_account_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_account_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "billing_type": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "stripe_subscription_id": { + "description": "Stripe subscription identifier for billing", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_account_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_entitlement_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "organizations": { + "description": "Companies or customer groups that can be attached to Portal Accounts", + "required": [ + "organization_id", + "organization_name" + ], + "properties": { + "organization_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "organization_name": { + "description": "Name of the organization", + "format": "character varying", + "maxLength": 69, + "type": "string" + }, + "deleted_at": { + "description": "Soft delete timestamp", + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, "networks": { "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", "required": [ @@ -1647,6 +3652,55 @@ }, "type": "object" }, + "gateways": { + "description": "Onchain gateway information including stake and network details", + "required": [ + "gateway_address", + "stake_amount", + "stake_denom", + "network_id" + ], + "properties": { + "gateway_address": { + "description": "Blockchain address of the gateway\n\nNote:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "stake_amount": { + "description": "Amount of tokens staked by the gateway", + "format": "bigint", + "type": "integer" + }, + "stake_denom": { + "format": "character varying", + "maxLength": 15, + "type": "string" + }, + "network_id": { + "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "gateway_private_key_hex": { + "format": "character varying", + "maxLength": 64, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, "service_endpoints": { "description": "Available endpoint types for each service", "required": [ diff --git a/portal-db/api/postgrest/init.sql b/portal-db/api/postgrest/init.sql index 22382c837..26e2443fd 100644 --- a/portal-db/api/postgrest/init.sql +++ b/portal-db/api/postgrest/init.sql @@ -1,11 +1,27 @@ -- ============================================================================ -- PostgREST API Setup for Portal DB -- ============================================================================ --- Minimal setup for PostgREST API access +-- This file sets up the database roles and permissions for PostgREST JWT authentication -- ============================================================================ -- CREATE ESSENTIAL POSTGREST ROLES -- ============================================================================ +-- +-- THREE-ROLE AUTHENTICATION SYSTEM: +-- 1. AUTHENTICATOR: The role PostgREST uses to connect to the database +-- - Has LOGIN permission to connect +-- - Has NOINHERIT so it starts with no permissions +-- - Can switch to other roles via "SET ROLE" command +-- +-- 2. ANON: Role for anonymous/unauthenticated requests +-- - Has NOLOGIN (cannot connect directly) +-- - Limited permissions for public data only +-- - Used when no JWT token is provided +-- +-- 3. AUTHENTICATED: Role for authenticated requests +-- - Has NOLOGIN (cannot connect directly) +-- - Extended permissions for user data +-- - Used when JWT contains "role": "authenticated" -- Create the authenticator role (used by PostgREST to connect) -- This role can switch to other roles but has no direct permissions @@ -47,10 +63,53 @@ TO authenticated; CREATE SCHEMA IF NOT EXISTS api; GRANT USAGE ON SCHEMA api TO anon, authenticated; +-- ============================================================================ +-- JWT CLAIMS ACCESS EXAMPLE +-- ============================================================================ +-- Example function showing how to access JWT claims in SQL +-- Based on PostgREST documentation: https://postgrest.org/en/stable/explanations/db_authz.html +-- +-- NOTE: RPC functions must be in 'public' schema for PostgREST to find them +-- PostgREST looks for RPC functions in the public schema by default +-- +-- JWT AUTHENTICATION FLOW: +-- 1. Client generates JWT externally +-- 2. Client sends request with "Authorization: Bearer " +-- 3. PostgREST verifies JWT signature using jwt-secret from postgrest.conf +-- 4. PostgREST extracts 'role' claim from JWT payload +-- 5. PostgREST executes "SET ROLE ;" in database +-- 6. Database query runs with that role's permissions +-- 7. PostgREST sets JWT claims as transaction-scoped settings for SQL access + +-- Function to get current user info from JWT claims +CREATE OR REPLACE FUNCTION public.me() +RETURNS JSON AS $$ +BEGIN + -- Access JWT claims as shown in PostgREST docs + -- PostgREST automatically sets 'request.jwt.claims' with the JWT payload + -- current_setting('request.jwt.claims', true)::json->>'claim_name' + RETURN json_build_object( + 'role', current_setting('request.jwt.claims', true)::json->>'role', + 'email', current_setting('request.jwt.claims', true)::json->>'email' + ); +END; +$$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + +-- Grant execute permission to authenticated users only +GRANT EXECUTE ON FUNCTION public.me TO authenticated; + -- ============================================================================ -- GRANTS FOR AUTHENTICATOR -- ============================================================================ +-- +-- CRITICAL: Allow authenticator to "become" other roles +-- When PostgREST receives a JWT with "role": "authenticated", it executes: +-- SET ROLE authenticated; +-- When PostgREST receives no JWT (or invalid JWT), it executes: +-- SET ROLE anon; +-- +-- These GRANT statements make the role switching possible: -- Grant the authenticator role the ability to switch to API roles -GRANT anon TO authenticator; -GRANT authenticated TO authenticator; +GRANT anon TO authenticator; -- Allows: SET ROLE anon; +GRANT authenticated TO authenticator; -- Allows: SET ROLE authenticated; diff --git a/portal-db/api/postgrest/postgrest.conf b/portal-db/api/postgrest/postgrest.conf index 95b6b170b..95bf086be 100644 --- a/portal-db/api/postgrest/postgrest.conf +++ b/portal-db/api/postgrest/postgrest.conf @@ -59,6 +59,37 @@ server-cors-allowed-origins = "" # https://postgrest.org/en/stable/references/configuration.html#log-level log-level = "info" +# ============================================================================ +# JWT AUTHENTICATION CONFIGURATION +# ============================================================================ +# +# JWT VERIFICATION PROCESS (handled automatically by PostgREST): +# 1. Client sends: Authorization: Bearer +# 2. PostgREST extracts token from header +# 3. PostgREST verifies signature using jwt-secret below +# 4. If valid, PostgREST extracts claims from JWT payload +# 5. PostgREST looks for role claim (specified by jwt-role-claim-key) +# 6. PostgREST executes: SET ROLE ; +# 7. PostgREST sets JWT claims as transaction-scoped settings +# +# Example JWT payload generated by tmp/gen-jwt.js: +# { +# "role": "authenticated", <- Used for SET ROLE command +# "email": "john@doe.com", <- Available via current_setting() +# "exp": 1758126390 <- Token expiration +# } + +# Secret for JWT token verification (32+ characters required) +# https://postgrest.org/en/stable/references/configuration.html#jwt-secret +# WARNING: Use a secure random secret in production! +# MUST match the secret used in tmp/gen-jwt.js for token generation +jwt-secret = "supersecretjwtsecretforlocaldevelopment123456789" + +# JWT role claim key - specifies which JWT claim contains the database role +# https://postgrest.org/en/stable/references/configuration.html#jwt-role-claim-key +# The "." prefix indicates JSON path: payload.role -> "authenticated" or "anon" +jwt-role-claim-key = ".role" + # ============================================================================ # CONNECTION POOL CONFIGURATION # ============================================================================ diff --git a/portal-db/api/scripts/gen-jwt.sh b/portal-db/api/scripts/gen-jwt.sh new file mode 100755 index 000000000..81b7aae9b --- /dev/null +++ b/portal-db/api/scripts/gen-jwt.sh @@ -0,0 +1,142 @@ +#!/bin/bash + +# ============================================================================ +# JWT Token Generator for PostgREST (Shell Script Version) +# ============================================================================ +# Generates JWT tokens for PostgREST authentication using shell commands +# Following PostgREST Tutorial: https://docs.postgrest.org/en/v13/tutorials/tut1.html +# +# Dependencies: +# - openssl (for HMAC-SHA256 signing) +# - base64 (for encoding) +# - jq (for JSON processing) +# +# Usage: +# ./gen-jwt.sh # Generate token for 'authenticated' role +# ./gen-jwt.sh anon # Generate token for 'anon' role +# ./gen-jwt.sh authenticated user@email # Generate token with specific email + +set -e # Exit on any error + +# JWT secret from postgrest.conf (must match exactly) +JWT_SECRET="supersecretjwtsecretforlocaldevelopment123456789" + +# Get command line arguments +ROLE="${1:-authenticated}" +EMAIL="${2:-john@doe.com}" + +# Calculate expiration (1 hour from now) +EXP=$(date -d '+1 hour' +%s 2>/dev/null || date -v+1H +%s 2>/dev/null || echo $(($(date +%s) + 3600))) + +# ============================================================================ +# JWT Generation Functions +# ============================================================================ + +# Base64 URL encoding (removes padding and makes URL-safe) +base64url_encode() { + base64 -w 0 2>/dev/null | tr '+/' '-_' | tr -d '=' || base64 | tr '+/' '-_' | tr -d '=' +} + +# Base64 URL decoding (adds padding and decodes) +base64url_decode() { + local input="$1" + # Add padding if needed + case $((${#input} % 4)) in + 2) input="${input}==" ;; + 3) input="${input}=" ;; + esac + echo "$input" | tr '_-' '/+' | base64 -d 2>/dev/null || echo "$input" | tr '_-' '/+' | base64 -D 2>/dev/null +} + +# Create JWT header +create_header() { + echo -n '{"alg":"HS256","typ":"JWT"}' | base64url_encode +} + +# Create JWT payload +create_payload() { + local role="$1" + local email="$2" + local exp="$3" + + # Create JSON payload + echo -n "{\"role\":\"$role\",\"email\":\"$email\",\"exp\":$exp}" | base64url_encode +} + +# Create JWT signature using HMAC-SHA256 +create_signature() { + local data="$1" + local secret="$2" + + echo -n "$data" | openssl dgst -sha256 -hmac "$secret" -binary | base64url_encode +} + +# ============================================================================ +# Generate JWT Token +# ============================================================================ + +echo "๐Ÿ”‘ Generating JWT Token with Shell Script โœจ" +echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" + +# Create header and payload +echo "๐Ÿ“ Creating JWT components..." +HEADER=$(create_header) +PAYLOAD=$(create_payload "$ROLE" "$EMAIL" "$EXP") + +# Create signature data (header.payload) +SIGNATURE_DATA="$HEADER.$PAYLOAD" + +# Generate signature +echo "๐Ÿ” Signing token with HMAC-SHA256..." +SIGNATURE=$(create_signature "$SIGNATURE_DATA" "$JWT_SECRET") + +# Complete JWT token +JWT_TOKEN="$SIGNATURE_DATA.$SIGNATURE" + +# ============================================================================ +# Display Results +# ============================================================================ + +echo "โœ… JWT Token Generated Successfully!" +echo "" +echo "๐Ÿ‘ค Role: $ROLE" +echo "๐Ÿ“ง Email: $EMAIL" +echo "โฐ Expires: $(date -d @$EXP 2>/dev/null || date -r $EXP 2>/dev/null || echo "Unix timestamp: $EXP")" +echo "" +echo "๐ŸŽŸ๏ธ Token:" +echo "$JWT_TOKEN" +echo "" +echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" +echo "๐Ÿš€ Usage Example:" +echo "curl http://localhost:3000/rpc/me \\" +echo " -H \"Authorization: Bearer $JWT_TOKEN\" \\" +echo " -H \"Content-Type: application/json\"" +echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" + +# ============================================================================ +# Verification and Debugging +# ============================================================================ + +echo "" +echo "๐Ÿ” Token Payload (decoded for verification):" + +# Decode the payload using our custom base64url_decode function +DECODED_PAYLOAD=$(base64url_decode "$PAYLOAD") + +if command -v jq >/dev/null 2>&1; then + # Pretty print with jq if available + echo "$DECODED_PAYLOAD" | jq . 2>/dev/null || echo "โŒ Could not parse JSON payload" +else + # Basic JSON formatting without jq + echo "$DECODED_PAYLOAD" | sed 's/,/,\n /g' | sed 's/{/{\n /' | sed 's/}/\n}/' || echo "โŒ Could not decode payload" + echo "" + echo "๐Ÿ’ก Install 'jq' for better JSON formatting: brew install jq" +fi + +# Export token for use by other scripts +export JWT_TOKEN +echo "" +echo "๐Ÿ’พ Token exported as \$JWT_TOKEN environment variable for use in other scripts! ๐ŸŽฏ" + +echo "" +echo "๐ŸŽ‰ Happy testing with PostgREST! ๐Ÿš€" diff --git a/portal-db/api/scripts/generate-sdks.sh b/portal-db/api/scripts/generate-sdks.sh deleted file mode 100644 index 1e6973a68..000000000 --- a/portal-db/api/scripts/generate-sdks.sh +++ /dev/null @@ -1,239 +0,0 @@ -#!/bin/bash - -# Generate Go SDK from OpenAPI specification using oapi-codegen -# This script generates a Go client SDK for the Portal DB API - -set -e - -# Configuration -OPENAPI_DIR="../openapi" -OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" -OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" -GO_OUTPUT_DIR="../../sdk/go" -CONFIG_MODELS="./codegen-models.yaml" -CONFIG_CLIENT="./codegen-client.yaml" -POSTGREST_URL="http://localhost:3000" - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification using oapi-codegen..." - -# ============================================================================ -# PHASE 1: ENVIRONMENT VALIDATION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 1: Environment Validation${NC}" - -# Check if Go is installed -if ! command -v go >/dev/null 2>&1; then - echo -e "${RED}โŒ Go is not installed. Please install Go first.${NC}" - echo " - Mac: brew install go" - echo " - Or download from: https://golang.org/" - exit 1 -fi - -echo -e "${GREEN}โœ… Go is installed: $(go version)${NC}" - -# Check if oapi-codegen is installed -if ! command -v oapi-codegen >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing oapi-codegen..." - go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest - - # Verify installation - if ! command -v oapi-codegen >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install oapi-codegen. Please check your Go installation.${NC}" - exit 1 - fi -fi - -echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" - -# Check if PostgREST is running -echo "๐ŸŒ Checking PostgREST availability..." -if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then - echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" - echo " Please ensure PostgREST is running:" - echo " cd .. && docker compose up -d" - echo " cd api && docker compose up -d" - exit 1 -fi - -echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" - -# Check if configuration files exist -for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do - if [ ! -f "$config_file" ]; then - echo -e "${RED}โŒ Configuration file not found: $config_file${NC}" - echo " This should have been created as a permanent file." - exit 1 - fi -done - -echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" - -# ============================================================================ -# PHASE 2: SPEC RETRIEVAL & CONVERSION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" - -# Create openapi directory if it doesn't exist -mkdir -p "$OPENAPI_DIR" - -# Clean any existing files to start fresh -echo "๐Ÿงน Cleaning previous OpenAPI files..." -rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" - -# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) -echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." -if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" > "$OPENAPI_V2_FILE"; then - echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" - exit 1 -fi - -# Verify the file was created and has content -if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then - echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" - -# Convert Swagger 2.0 to OpenAPI 3.x -echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." - -# Check if swagger2openapi is available -if ! command -v swagger2openapi >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing swagger2openapi converter..." - if command -v npm >/dev/null 2>&1; then - npm install -g swagger2openapi - else - echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" - echo " - Mac: brew install node" - echo " - Or download from: https://nodejs.org/" - exit 1 - fi -fi - -if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" - exit 1 -fi - -# Fix boolean format issues in the converted spec (in place) -echo "๐Ÿ”ง Fixing boolean format issues..." -sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" -rm -f "${OPENAPI_V3_FILE}.bak" - -# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version -echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." -rm -f "$OPENAPI_V2_FILE" - -echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" -echo -e "${BLUE}๐Ÿ“„ Final OpenAPI directory contents:${NC}" -echo " โ€ข openapi.json - OpenAPI 3.x specification (the only remaining file)" - -# ============================================================================ -# PHASE 3: SDK GENERATION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 3: SDK Generation${NC}" - -echo "๐Ÿน Generating Go SDK in separate files for better readability..." - -# Clean previous generated files -echo "๐Ÿงน Cleaning previous generated files..." -rm -f "$GO_OUTPUT_DIR/models.go" "$GO_OUTPUT_DIR/client.go" - -# Generate models file (data types and structures) -echo " Generating models.go..." -if ! oapi-codegen -config "$CONFIG_MODELS" "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to generate models${NC}" - exit 1 -fi - -# Generate client file (API client and methods) -echo " Generating client.go..." -if ! oapi-codegen -config "$CONFIG_CLIENT" "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to generate client${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" - -# ============================================================================ -# PHASE 4: MODULE SETUP -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 4: Module Setup${NC}" - -# Navigate to SDK directory for module setup -cd "$GO_OUTPUT_DIR" - -# Run go mod tidy to resolve dependencies -echo "๐Ÿ”ง Resolving dependencies..." -if ! go mod tidy; then - echo -e "${RED}โŒ Failed to resolve Go dependencies${NC}" - cd - >/dev/null - exit 1 -fi - -echo -e "${GREEN}โœ… Go dependencies resolved${NC}" - -# Test compilation -echo "๐Ÿ” Validating generated code compilation..." -if ! go build ./...; then - echo -e "${RED}โŒ Generated code does not compile${NC}" - cd - >/dev/null - exit 1 -fi - -echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" - -# Return to scripts directory -cd - >/dev/null - -# ============================================================================ -# SUCCESS SUMMARY -# ============================================================================ - -echo "" -echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" -echo "" -echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" -echo " API Docs: $OPENAPI_V3_FILE" -echo " SDK: $GO_OUTPUT_DIR" -echo " Module: github.com/grove/path/portal-db/sdk/go" -echo " Package: portaldb" -echo "" -echo -e "${BLUE}๐Ÿ“š SDK Files:${NC}" -echo " โ€ข models.go - Generated data models and types (updated)" -echo " โ€ข client.go - Generated SDK client and methods (updated)" -echo " โ€ข go.mod - Go module definition (permanent)" -echo " โ€ข README.md - Documentation (permanent)" -echo "" -echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" -echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" -echo "" -echo -e "${BLUE}๐Ÿš€ Next steps:${NC}" -echo " 1. Review the generated models: cat $GO_OUTPUT_DIR/models.go | head -50" -echo " 2. Review the generated client: cat $GO_OUTPUT_DIR/client.go | head -50" -echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" -echo " 4. Check the README: cat $GO_OUTPUT_DIR/README.md" -echo "" -echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" -echo " โ€ข Generated files: models.go (data types), client.go (API methods)" -echo " โ€ข Permanent files: go.mod, README.md" -echo " โ€ข Better readability: types separated from client logic" -echo " โ€ข Run this script after database schema changes" -echo "" -echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/api/scripts/test-auth.sh b/portal-db/api/scripts/test-auth.sh new file mode 100755 index 000000000..b30fc0152 --- /dev/null +++ b/portal-db/api/scripts/test-auth.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +# ============================================================================ +# JWT Authentication Test Script +# ============================================================================ +# This script tests the basic JWT authentication functionality +# Make sure the services are running: make postgrest-up + +set -e # Exit on any error + +API_URL="http://localhost:3000" +echo "๐Ÿ” Testing JWT Authentication with PostgREST" +echo "API URL: $API_URL" +echo + +# ============================================================================ +# Test 1: Anonymous Access (should work) +# ============================================================================ +echo "๐Ÿ“– Test 1: Anonymous access to public data" +echo "GET $API_URL/networks" + +RESPONSE=$(curl -s "$API_URL/networks" || echo "ERROR") +if [[ "$RESPONSE" == *"ERROR"* ]] || [[ "$RESPONSE" == *"error"* ]]; then + echo "โŒ Anonymous access failed" + echo "Response: $RESPONSE" + exit 1 +else + echo "โœ… Anonymous access works" + echo "Found $(echo "$RESPONSE" | jq length 2>/dev/null || echo "some") networks" +fi +echo + +# ============================================================================ +# Test 2: Generate JWT Token (External Generation) +# ============================================================================ +echo "๐Ÿ”‘ Test 2: Generating JWT token (following PostgREST docs) โœจ" + +# Generate JWT token using shell script (PostgREST best practice) +echo "๐Ÿ”ง Generating fresh JWT token using shell script..." +cd "$(dirname "$0")" # Ensure we're in the scripts directory + +# Generate token and capture output +JWT_OUTPUT=$(./gen-jwt.sh authenticated 2>/dev/null) +TOKEN=$(echo "$JWT_OUTPUT" | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) + +if [[ -z "$TOKEN" ]]; then + echo "โŒ Failed to generate JWT token" + echo "๐Ÿ’ก Make sure gen-jwt.sh is executable and openssl is installed" + exit 1 +fi + +echo "โœ… Generated fresh JWT token: ${TOKEN:0:50}... ๐ŸŽฏ" +echo "๐ŸŒŸ This demonstrates external JWT generation (PostgREST best practice)" +echo + +# ============================================================================ +# Test 3: Access Protected Resource with Token +# ============================================================================ +echo "๐Ÿ”’ Test 3: Access protected data with JWT token" +echo "GET $API_URL/portal_accounts (with Authorization header)" + +AUTH_RESPONSE=$(curl -s "$API_URL/portal_accounts" \ + -H "Authorization: Bearer $TOKEN" || echo "ERROR") + +if [[ "$AUTH_RESPONSE" == *"ERROR"* ]] || [[ "$AUTH_RESPONSE" == *"error"* ]]; then + echo "โŒ Authenticated access failed" + echo "Response: $AUTH_RESPONSE" + exit 1 +else + echo "โœ… Authenticated access works" + echo "Found $(echo "$AUTH_RESPONSE" | jq length 2>/dev/null || echo "some") portal accounts" +fi +echo + +# ============================================================================ +# Test 4: Get Current User Info +# ============================================================================ +echo "๐Ÿ‘ค Test 4: Get current user info" +echo "POST $API_URL/rpc/me" + +ME_RESPONSE=$(curl -s -X POST "$API_URL/rpc/me" \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json" || echo "ERROR") + +if [[ "$ME_RESPONSE" == *"ERROR"* ]] || [[ "$ME_RESPONSE" == *"error"* ]]; then + echo "โŒ Get user info failed" + echo "Response: $ME_RESPONSE" + exit 1 +else + echo "โœ… Get user info works" + echo "User info: $ME_RESPONSE" +fi +echo + +# ============================================================================ +# Test 5: Access Protected Resource WITHOUT Token (should fail) +# ============================================================================ +echo "๐Ÿšซ Test 5: Try to access protected data without token (should fail)" +echo "GET $API_URL/portal_accounts (no Authorization header)" + +UNAUTH_RESPONSE=$(curl -s "$API_URL/portal_accounts" || echo "ERROR") +# We expect this to either return empty or give an error - both are fine + +echo "Response: $UNAUTH_RESPONSE" +echo "โœ… This test shows the difference between authenticated and anonymous access" +echo + +# ============================================================================ +# Summary +# ============================================================================ +echo "๐ŸŽ‰ All JWT authentication tests passed! ๐Ÿš€" +echo +echo "๐Ÿ“Š Summary:" +echo "- โœ… Anonymous users can access public data ๐ŸŒ" +echo "- โœ… JWT tokens (generated externally) provide access to protected data ๐Ÿ”" +echo "- โœ… JWT claims can be accessed in SQL via current_setting() ๐Ÿ“‹" +echo "- โœ… Requests without tokens have limited access ๐Ÿšซ" +echo +echo "๐Ÿ“š PostgREST Documentation Approach:" +echo "- โœ… JWT tokens generated externally (as documented) ๐Ÿ”ง" +echo "- โœ… Simple role-based access control via JWT role claim ๐Ÿ‘ฅ" +echo "- โœ… No hardcoded user data in database functions ๐ŸŽฏ" +echo +echo "๐Ÿš€ Next steps:" +echo "- ๐Ÿ“– Try the examples in api/auth-examples.md" +echo "- ๐Ÿ”‘ Generate your own JWT tokens: ./api/scripts/gen-jwt.sh" +echo "- ๐Ÿ“„ View the API documentation at $API_URL" +echo "- ๐Ÿ” Explore the database roles and permissions" +echo +echo "๐ŸŽŠ Happy coding with PostgREST! โœจ" diff --git a/portal-db/scripts/hydrate-testdata.sh b/portal-db/scripts/hydrate-testdata.sh new file mode 100755 index 000000000..25a97c896 --- /dev/null +++ b/portal-db/scripts/hydrate-testdata.sh @@ -0,0 +1,242 @@ +#!/bin/bash + +# ๐Ÿš€ Test Data Hydration Script for Portal DB +# This script populates the Portal DB with test data for development and testing + +set -e + +# ๐ŸŽจ Color codes for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +PURPLE='\033[0;35m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# ๐Ÿ“ Function to print colored output +print_status() { + local color=$1 + local message=$2 + echo -e "${color}${message}${NC}" +} + +# ๐Ÿ” Function to validate database connection +validate_db_connection() { + if [ -z "$DB_CONNECTION_STRING" ]; then + print_status $RED "โŒ Error: DB_CONNECTION_STRING environment variable is required" + print_status $YELLOW "๐Ÿ’ก Expected format: postgresql://user:password@host:port/database" + print_status $YELLOW "๐Ÿ’ก For local development: postgresql://postgres:portal_password@localhost:5435/portal_db" + exit 1 + fi + + print_status $BLUE "๐Ÿ” Testing database connection..." + if ! psql "$DB_CONNECTION_STRING" -c "SELECT 1;" > /dev/null 2>&1; then + print_status $RED "โŒ Error: Cannot connect to database" + print_status $YELLOW "๐Ÿ’ก Make sure the database is running: make postgrest-up" + exit 1 + fi + + print_status $GREEN "โœ… Database connection successful" +} + +# ๐Ÿ“Š Function to insert test data +insert_test_data() { + print_status $BLUE "๐Ÿ“Š Inserting test data into Portal DB..." + + # Execute the SQL in a single transaction + psql "$DB_CONNECTION_STRING" < + ApplicationAddress string `json:"application_address"` + ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Note: + // This is a Foreign Key to `gateways.gateway_address`. + GatewayAddress string `json:"gateway_address"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + StakeAmount *int `json:"stake_amount,omitempty"` + StakeDenom *string `json:"stake_denom,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Gateways Onchain gateway information including stake and network details +type Gateways struct { + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Blockchain address of the gateway + // + // Note: + // This is a Primary Key. + GatewayAddress string `json:"gateway_address"` + GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount int `json:"stake_amount"` + StakeDenom string `json:"stake_denom"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + // Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) type Networks struct { // NetworkId Note: @@ -188,6 +403,86 @@ type Networks struct { NetworkId string `json:"network_id"` } +// Organizations Companies or customer groups that can be attached to Portal Accounts +type Organizations struct { + CreatedAt *string `json:"created_at,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *string `json:"deleted_at,omitempty"` + + // OrganizationId Note: + // This is a Primary Key. + OrganizationId int `json:"organization_id"` + + // OrganizationName Name of the organization + OrganizationName string `json:"organization_name"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalAccounts Multi-tenant accounts with plans and billing integration +type PortalAccounts struct { + BillingType *string `json:"billing_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + GcpAccountId *string `json:"gcp_account_id,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + InternalAccountName *string `json:"internal_account_name,omitempty"` + + // OrganizationId Note: + // This is a Foreign Key to `organizations.organization_id`. + OrganizationId *int `json:"organization_id,omitempty"` + + // PortalAccountId Unique identifier for the portal account + // + // Note: + // This is a Primary Key. + PortalAccountId openapi_types.UUID `json:"portal_account_id"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType string `json:"portal_plan_type"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + +// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. +type PortalAccountsPortalAccountUserLimitInterval string + +// PortalApplications Applications created within portal accounts with their own rate limits and settings +type PortalApplications struct { + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + Emoji *string `json:"emoji,omitempty"` + FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId openapi_types.UUID `json:"portal_account_id"` + PortalApplicationDescription *string `json:"portal_application_description,omitempty"` + + // PortalApplicationId Note: + // This is a Primary Key. + PortalApplicationId openapi_types.UUID `json:"portal_application_id"` + PortalApplicationName *string `json:"portal_application_name,omitempty"` + PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *string `json:"secret_key_hash,omitempty"` + SecretKeyRequired *bool `json:"secret_key_required,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. +type PortalApplicationsPortalApplicationUserLimitInterval string + // PortalPlans Available subscription plans for Portal Accounts type PortalPlans struct { PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` @@ -283,6 +578,9 @@ type Order = string // PreferCount defines model for preferCount. type PreferCount string +// PreferParams defines model for preferParams. +type PreferParams string + // PreferPost defines model for preferPost. type PreferPost string @@ -295,9 +593,159 @@ type Range = string // RangeUnit defines model for rangeUnit. type RangeUnit = string +// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. +type RowFilterApplicationsApplicationAddress = string + +// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. +type RowFilterApplicationsApplicationPrivateKeyHex = string + +// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. +type RowFilterApplicationsCreatedAt = string + +// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. +type RowFilterApplicationsGatewayAddress = string + +// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. +type RowFilterApplicationsNetworkId = string + +// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. +type RowFilterApplicationsServiceId = string + +// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. +type RowFilterApplicationsStakeAmount = string + +// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. +type RowFilterApplicationsStakeDenom = string + +// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. +type RowFilterApplicationsUpdatedAt = string + +// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. +type RowFilterGatewaysCreatedAt = string + +// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. +type RowFilterGatewaysGatewayAddress = string + +// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. +type RowFilterGatewaysGatewayPrivateKeyHex = string + +// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. +type RowFilterGatewaysNetworkId = string + +// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. +type RowFilterGatewaysStakeAmount = string + +// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. +type RowFilterGatewaysStakeDenom = string + +// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. +type RowFilterGatewaysUpdatedAt = string + // RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. type RowFilterNetworksNetworkId = string +// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. +type RowFilterOrganizationsCreatedAt = string + +// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. +type RowFilterOrganizationsDeletedAt = string + +// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. +type RowFilterOrganizationsOrganizationId = string + +// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. +type RowFilterOrganizationsOrganizationName = string + +// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. +type RowFilterOrganizationsUpdatedAt = string + +// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. +type RowFilterPortalAccountsBillingType = string + +// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. +type RowFilterPortalAccountsCreatedAt = string + +// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. +type RowFilterPortalAccountsDeletedAt = string + +// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. +type RowFilterPortalAccountsGcpAccountId = string + +// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. +type RowFilterPortalAccountsGcpEntitlementId = string + +// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. +type RowFilterPortalAccountsInternalAccountName = string + +// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. +type RowFilterPortalAccountsOrganizationId = string + +// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. +type RowFilterPortalAccountsPortalAccountId = openapi_types.UUID + +// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. +type RowFilterPortalAccountsPortalAccountUserLimit = string + +// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. +type RowFilterPortalAccountsPortalAccountUserLimitInterval = string + +// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. +type RowFilterPortalAccountsPortalAccountUserLimitRps = string + +// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. +type RowFilterPortalAccountsPortalPlanType = string + +// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. +type RowFilterPortalAccountsStripeSubscriptionId = string + +// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. +type RowFilterPortalAccountsUpdatedAt = string + +// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. +type RowFilterPortalAccountsUserAccountName = string + +// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. +type RowFilterPortalApplicationsCreatedAt = string + +// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. +type RowFilterPortalApplicationsDeletedAt = string + +// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. +type RowFilterPortalApplicationsEmoji = string + +// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. +type RowFilterPortalApplicationsFavoriteServiceIds = string + +// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. +type RowFilterPortalApplicationsPortalAccountId = openapi_types.UUID + +// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. +type RowFilterPortalApplicationsPortalApplicationDescription = string + +// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. +type RowFilterPortalApplicationsPortalApplicationId = openapi_types.UUID + +// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. +type RowFilterPortalApplicationsPortalApplicationName = string + +// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. +type RowFilterPortalApplicationsPortalApplicationUserLimit = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. +type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. +type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string + +// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. +type RowFilterPortalApplicationsSecretKeyHash = string + +// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. +type RowFilterPortalApplicationsSecretKeyRequired = string + +// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. +type RowFilterPortalApplicationsUpdatedAt = string + // RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. type RowFilterPortalPlansPlanApplicationLimit = string @@ -388,6 +836,186 @@ type RowFilterServicesUpdatedAt = string // Select defines model for select. type Select = string +// DeleteApplicationsParams defines parameters for DeleteApplications. +type DeleteApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. +type DeleteApplicationsParamsPrefer string + +// GetApplicationsParams defines parameters for GetApplications. +type GetApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetApplicationsParamsPrefer defines parameters for GetApplications. +type GetApplicationsParamsPrefer string + +// PatchApplicationsParams defines parameters for PatchApplications. +type PatchApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchApplicationsParamsPrefer defines parameters for PatchApplications. +type PatchApplicationsParamsPrefer string + +// PostApplicationsParams defines parameters for PostApplications. +type PostApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostApplicationsParamsPrefer defines parameters for PostApplications. +type PostApplicationsParamsPrefer string + +// DeleteGatewaysParams defines parameters for DeleteGateways. +type DeleteGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. +type DeleteGatewaysParamsPrefer string + +// GetGatewaysParams defines parameters for GetGateways. +type GetGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// GetGatewaysParamsPrefer defines parameters for GetGateways. +type GetGatewaysParamsPrefer string + +// PatchGatewaysParams defines parameters for PatchGateways. +type PatchGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchGatewaysParamsPrefer defines parameters for PatchGateways. +type PatchGatewaysParamsPrefer string + +// PostGatewaysParams defines parameters for PostGateways. +type PostGatewaysParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PostGatewaysParamsPrefer defines parameters for PostGateways. +type PostGatewaysParamsPrefer string + // DeleteNetworksParams defines parameters for DeleteNetworks. type DeleteNetworksParams struct { NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` @@ -451,6 +1079,315 @@ type PostNetworksParams struct { // PostNetworksParamsPrefer defines parameters for PostNetworks. type PostNetworksParamsPrefer string +// DeleteOrganizationsParams defines parameters for DeleteOrganizations. +type DeleteOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. +type DeleteOrganizationsParamsPrefer string + +// GetOrganizationsParams defines parameters for GetOrganizations. +type GetOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. +type GetOrganizationsParamsPrefer string + +// PatchOrganizationsParams defines parameters for PatchOrganizations. +type PatchOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. +type PatchOrganizationsParamsPrefer string + +// PostOrganizationsParams defines parameters for PostOrganizations. +type PostOrganizationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. +type PostOrganizationsParamsPrefer string + +// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParamsPrefer string + +// GetPortalAccountsParams defines parameters for GetPortalAccounts. +type GetPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. +type GetPortalAccountsParamsPrefer string + +// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParamsPrefer string + +// PostPortalAccountsParams defines parameters for PostPortalAccounts. +type PostPortalAccountsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. +type PostPortalAccountsParamsPrefer string + +// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParamsPrefer string + +// GetPortalApplicationsParams defines parameters for GetPortalApplications. +type GetPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. +type GetPortalApplicationsParamsPrefer string + +// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParamsPrefer string + +// PostPortalApplicationsParams defines parameters for PostPortalApplications. +type PostPortalApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. +type PostPortalApplicationsParamsPrefer string + // DeletePortalPlansParams defines parameters for DeletePortalPlans. type DeletePortalPlansParams struct { PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` @@ -541,6 +1478,24 @@ type PostPortalPlansParams struct { // PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. type PostPortalPlansParamsPrefer string +// PostRpcMeJSONBody defines parameters for PostRpcMe. +type PostRpcMeJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} + +// PostRpcMeParams defines parameters for PostRpcMe. +type PostRpcMeParams struct { + // Prefer Preference + Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcMeParamsPrefer defines parameters for PostRpcMe. +type PostRpcMeParamsPrefer string + // DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. type DeleteServiceEndpointsParams struct { EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` @@ -802,6 +1757,42 @@ type PostServicesParams struct { // PostServicesParamsPrefer defines parameters for PostServices. type PostServicesParamsPrefer string +// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. +type PatchApplicationsJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. +type PostApplicationsJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. +type PatchGatewaysJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + +// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. +type PostGatewaysJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + // PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. type PatchNetworksJSONRequestBody = Networks @@ -820,6 +1811,60 @@ type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks // PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks +// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. +type PatchOrganizationsJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. +type PostOrganizationsJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. +type PatchPortalAccountsJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. +type PostPortalAccountsJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. +type PatchPortalApplicationsJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. +type PostPortalApplicationsJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + // PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. type PatchPortalPlansJSONRequestBody = PortalPlans @@ -838,6 +1883,15 @@ type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans // PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans +// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. +type PostRpcMeJSONRequestBody = PostRpcMeJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody + // PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md new file mode 100644 index 000000000..7943b20da --- /dev/null +++ b/portal-db/sdk/typescript/README.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/portal-db/testdata/test-data.sql b/portal-db/testdata/test-data.sql deleted file mode 100644 index e58f9e8d4..000000000 --- a/portal-db/testdata/test-data.sql +++ /dev/null @@ -1,89 +0,0 @@ --- ============================================================================ --- TEST DATA FOR PORTAL DATABASE --- ============================================================================ - --- Insert test portal plans -INSERT INTO portal_plans (portal_plan_type, portal_plan_type_description, plan_usage_limit, plan_usage_limit_interval, plan_rate_limit_rps, plan_application_limit) VALUES - ('FREE', 'Free tier with basic limits', 1000, 'day', 10, 2), - ('STARTER', 'Starter plan for small projects', 10000, 'day', 50, 5), - ('PRO', 'Professional plan for growing businesses', 100000, 'month', 200, 20), - ('ENTERPRISE', 'Enterprise plan with custom limits', NULL, NULL, 1000, 100); - --- Insert test organizations -INSERT INTO organizations (organization_name) VALUES - ('Acme Corporation'), - ('Tech Innovators LLC'), - ('Blockchain Solutions Inc'), - ('Web3 Builders Co'); - --- Insert test services -INSERT INTO services (service_id, service_name, compute_units_per_relay, service_domains, network_id, active, quality_fallback_enabled, hard_fallback_enabled) VALUES - ('ethereum-mainnet', 'Ethereum Mainnet', 1, ARRAY['eth-mainnet.gateway.pokt.network'], 'pocket', true, true, false), - ('ethereum-sepolia', 'Ethereum Sepolia Testnet', 1, ARRAY['eth-sepolia.gateway.pokt.network'], 'pocket', true, false, false), - ('polygon-mainnet', 'Polygon Mainnet', 1, ARRAY['poly-mainnet.gateway.pokt.network'], 'pocket', true, true, true), - ('arbitrum-one', 'Arbitrum One', 2, ARRAY['arbitrum-one.gateway.pokt.network'], 'pocket', true, false, false), - ('base-mainnet', 'Base Mainnet', 2, ARRAY['base-mainnet.gateway.pokt.network'], 'pocket', false, false, false); - --- Insert test service endpoints -INSERT INTO service_endpoints (service_id, endpoint_type) VALUES - ('ethereum-mainnet', 'JSON-RPC'), - ('ethereum-mainnet', 'WSS'), - ('ethereum-sepolia', 'JSON-RPC'), - ('polygon-mainnet', 'JSON-RPC'), - ('polygon-mainnet', 'REST'), - ('arbitrum-one', 'JSON-RPC'), - ('base-mainnet', 'JSON-RPC'); - --- Insert test service fallbacks -INSERT INTO service_fallbacks (service_id, fallback_url) VALUES - ('ethereum-mainnet', 'https://eth-mainnet.infura.io/v3/fallback'), - ('ethereum-mainnet', 'https://mainnet.infura.io/v3/backup'), - ('polygon-mainnet', 'https://polygon-mainnet.infura.io/v3/fallback'), - ('arbitrum-one', 'https://arbitrum-mainnet.infura.io/v3/fallback'); - --- Insert test portal users -INSERT INTO portal_users (portal_user_email, signed_up, portal_admin) VALUES - ('admin@grove.city', true, true), - ('alice@acme.com', true, false), - ('bob@techinnovators.com', true, false), - ('charlie@blockchain.com', false, false); - --- Insert test portal accounts -INSERT INTO portal_accounts (organization_id, portal_plan_type, user_account_name, internal_account_name, billing_type) VALUES - (1, 'ENTERPRISE', 'acme-corp', 'internal-acme', 'stripe'), - (2, 'PRO', 'tech-innovators', 'internal-tech', 'stripe'), - (3, 'STARTER', 'blockchain-solutions', 'internal-blockchain', 'gcp'), - (4, 'FREE', 'web3-builders', 'internal-web3', 'stripe'); - --- Insert test portal applications -INSERT INTO portal_applications ( - portal_account_id, - portal_application_name, - emoji, - portal_application_description, - favorite_service_ids, - secret_key_required -) -SELECT - pa.portal_account_id, - CASE - WHEN pa.user_account_name = 'acme-corp' THEN 'DeFi Dashboard' - WHEN pa.user_account_name = 'tech-innovators' THEN 'NFT Marketplace' - WHEN pa.user_account_name = 'blockchain-solutions' THEN 'Analytics Platform' - ELSE 'Test Application' - END, - CASE - WHEN pa.user_account_name = 'acme-corp' THEN '๐Ÿ’ฐ' - WHEN pa.user_account_name = 'tech-innovators' THEN '๐Ÿ–ผ๏ธ' - WHEN pa.user_account_name = 'blockchain-solutions' THEN '๐Ÿ“Š' - ELSE '๐Ÿงช' - END, - CASE - WHEN pa.user_account_name = 'acme-corp' THEN 'Real-time DeFi protocol dashboard' - WHEN pa.user_account_name = 'tech-innovators' THEN 'Multi-chain NFT marketplace application' - WHEN pa.user_account_name = 'blockchain-solutions' THEN 'Cross-chain analytics and monitoring' - ELSE 'General purpose test application' - END, - ARRAY['ethereum-mainnet', 'polygon-mainnet'], - true -FROM portal_accounts pa; From 45d0747dc1ebb9adfeb5987b25012dd39bfc51b3 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 17 Sep 2025 18:06:24 -0400 Subject: [PATCH 05/43] adding legacy transforms for Grove Portal --- portal-db/scripts/legacy-transform_down.sql | 39 +++++ portal-db/scripts/legacy-transform_up.sql | 176 ++++++++++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 portal-db/scripts/legacy-transform_down.sql create mode 100644 portal-db/scripts/legacy-transform_up.sql diff --git a/portal-db/scripts/legacy-transform_down.sql b/portal-db/scripts/legacy-transform_down.sql new file mode 100644 index 000000000..eba67e6ca --- /dev/null +++ b/portal-db/scripts/legacy-transform_down.sql @@ -0,0 +1,39 @@ +-- legacy-transform_down.sql + +-- Undoes only the changes made by legacy-transform_up.sql +-- This preserves any other data that might exist in the portal database + +BEGIN; + +-- Disable foreign key checks temporarily to avoid constraint issues +SET session_replication_role = replica; + +-- Delete only the data we inserted (in reverse dependency order) +-- portal_applications (depends on portal_accounts) +DELETE FROM portal.portal_applications; + +-- portal_account_rbac (depends on portal_accounts and portal_users) +DELETE FROM portal.portal_account_rbac; + +-- portal_accounts (depends on portal_plans) +DELETE FROM portal.portal_accounts; + +-- portal_users +DELETE FROM portal.portal_users; + +-- rbac (only the legacy roles we inserted) +DELETE FROM portal.rbac WHERE role_name IN ('LEGACY_ADMIN', 'LEGACY_OWNER', 'LEGACY_MEMBER'); + +-- portal_plans (only the specific plans we inserted) +DELETE FROM portal.portal_plans WHERE portal_plan_type IN ('PLAN_FREE', 'PLAN_UNLIMITED', 'PLAN_ENTERPRISE', 'PLAN_INTERNAL'); + +-- Re-enable foreign key checks +SET session_replication_role = DEFAULT; + +-- Reset sequences to start from 1 (only for tables we populated) +ALTER SEQUENCE IF EXISTS portal_users_portal_user_id_seq RESTART WITH 1; +ALTER SEQUENCE IF EXISTS rbac_role_id_seq RESTART WITH 1; +ALTER SEQUENCE IF EXISTS portal_account_rbac_id_seq RESTART WITH 1; + +COMMIT; + diff --git a/portal-db/scripts/legacy-transform_up.sql b/portal-db/scripts/legacy-transform_up.sql new file mode 100644 index 000000000..c69b2d3f4 --- /dev/null +++ b/portal-db/scripts/legacy-transform_up.sql @@ -0,0 +1,176 @@ +-- legacy-transform_up.sql + + +-- Transform from Legacy Portal DB Data to New Portal DB +-- Order of operations mimics the init script in PATH repo +-- See: https://github.com/buildwithgrove/path +BEGIN; + +-- We omit the organizations tables as these are net new and not a hard requirement for any subsequent tables + +-- First populate the Portal Plans +INSERT INTO "portal".portal_plans ( + portal_plan_type, + portal_plan_type_description, + plan_usage_limit, + plan_usage_limit_interval, + plan_rate_limit_rps, + plan_application_limit +) +VALUES + ('PLAN_FREE', 'Free tier with limited usage', 1000000, 'month', 0, 2), + ('PLAN_UNLIMITED', 'Unlimited Relays. Unlimited RPS.', 0, NULL, 0, 0), + -- Note that we rename ENTERPRISE -> PLAN_ENTERPRISE for consistency + ('PLAN_ENTERPRISE', 'Special case for Legacy Enterprise customers', 0, NULL, 0, 0), + -- Introduce the new plan type so we can separate out Grove-owned services + ('PLAN_INTERNAL', 'Plan for internal accounts', 0, NULL, 0, 0); + +-- Transform the legacy accounts to the new accounts structure +-- If the plan doesn't match one of our new plan types, then move them to `PLAN_FREE` +INSERT INTO portal.portal_accounts ( + portal_account_id, + organization_id, + portal_plan_type, + user_account_name, + internal_account_name, + portal_account_user_limit, + portal_account_user_limit_interval, + portal_account_user_limit_rps, + billing_type, + stripe_subscription_id, + gcp_account_id, + gcp_entitlement_id, + deleted_at, + created_at, + updated_at +) +SELECT + -- casts each legacy ID as a uuid + a.id::uuid as portal_account_id, + NULL as organization_id, + CASE + WHEN a.plan_type = 'ENTERPRISE' THEN 'PLAN_ENTERPRISE' + WHEN a.plan_type = 'PLAN_UNLIMITED' THEN 'PLAN_UNLIMITED' + ELSE 'PLAN_FREE' + END as portal_plan_type, + a.name as user_account_name, + a.name as internal_account_name, + CASE + WHEN a.monthly_user_limit = 0 THEN NULL + ELSE a.monthly_user_limit + END as portal_account_user_limit, + CASE + WHEN a.monthly_user_limit > 0 THEN 'month'::plan_interval + ELSE NULL + END as portal_account_user_limit_interval, + NULL as portal_account_user_limit_rps, + a.billing_type, + ai.stripe_subscription_id, + a.gcp_account_id, + a.gcp_entitlement_id, + CASE + WHEN a.deleted = true THEN a.deleted_at + ELSE NULL + END as deleted_at, + a.created_at, + a.updated_at +FROM "legacy-extract".accounts a +LEFT JOIN "legacy-extract".account_integrations ai ON a.id = ai.account_id; + +-- Transform the legacy users to the new users table and make sure to grab all relevant data +INSERT INTO portal.portal_users ( + portal_user_id, + portal_user_email, + signed_up, + portal_admin, + deleted_at, + created_at, + updated_at +) +SELECT + u.id as portal_user_id, + u.email as portal_user_email, + COALESCE(u.signed_up, FALSE) as signed_up, + FALSE as portal_admin, + NULL as deleted_at, + u.created_at, + u.updated_at +FROM "legacy-extract".users u; + +-- Update the sequence after inserting users with specific IDs +SELECT setval('portal_users_portal_user_id_seq', (SELECT MAX(portal_user_id) FROM portal_users)); + +-- Load the RBAC Table with the basic roles we have today, to be adjusted later +-- Note that we tag them with the `LEGACY_` prefix so we can parse these out later +INSERT INTO portal.rbac ( + role_id, + role_name, + permissions +) +VALUES + (DEFAULT, 'LEGACY_ADMIN', ARRAY[]), + (DEFAULT, 'LEGACY_OWNER', ARRAY[]), + (DEFAULT, 'LEGACY_MEMBER', ARRAY[]); + +-- Transform the legacy account_users table into the new portal_account_rbac +-- Note that we transform the role names to include a `LEGACY_` prefix so these are easier +-- to parse. +INSERT INTO portal.portal_account_rbac ( + portal_account_id, + portal_user_id, + role_name, + user_joined_account +) +SELECT + au.account_id::uuid as portal_account_id, + au.user_id as portal_user_id, + CASE + WHEN au.role_name = 'ADMIN' THEN 'LEGACY_ADMIN' + WHEN au.role_name = 'OWNER' THEN 'LEGACY_OWNER' + WHEN au.role_name = 'MEMBER' THEN 'LEGACY_MEMBER' + ELSE au.role_name + END as role_name, + COALESCE(au.accepted, FALSE) as user_joined_account +FROM "legacy-extract".account_users au; + +-- Transform the legacy portal_applications to the new portal_applications structure +-- Consolidates some structures from multiple legacy tables +INSERT INTO portal.portal_applications ( + portal_application_id, + portal_account_id, + portal_application_name, + emoji, + portal_application_user_limit, + portal_application_user_limit_interval, + portal_application_user_limit_rps, + portal_application_description, + favorite_service_ids, + secret_key_hash, + secret_key_required, + deleted_at, + created_at, + updated_at +) +SELECT + pa.id::uuid as portal_application_id, + pa.account_id::uuid as portal_account_id, + pa.name as portal_application_name, + pa.app_emoji as emoji, + NULL as portal_application_user_limit, + NULL as portal_application_user_limit_interval, + NULL as portal_application_user_limit_rps, + pa.description as portal_application_description, + pas.favorited_chain_ids as favorite_service_ids, + pas.secret_key as secret_key_hash, + COALESCE(pas.secret_key_required, FALSE) as secret_key_required, + CASE + WHEN pa.deleted = true THEN pa.deleted_at + ELSE NULL + END as deleted_at, + pa.created_at, + COALESCE(pas.updated_at, pa.updated_at) as updated_at +FROM "legacy-extract".portal_applications pa +LEFT JOIN "legacy-extract".portal_application_settings pas ON pa.id = pas.application_id; + +COMMIT; + From 568d917016601a9c24d51072cb8527883490749d Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 18 Sep 2025 12:12:47 -0400 Subject: [PATCH 06/43] enhancing hydration scripts, fixing schema, enhancing transform --- portal-db/init/001_schema.sql | 3 +- portal-db/scripts/hydrate-applications.sh | 338 +++++++++++++++----- portal-db/scripts/hydrate-gateways.sh | 315 +++++++++++++++--- portal-db/scripts/hydrate-services.sh | 205 +++++++++--- portal-db/scripts/legacy-transform_down.sql | 3 + portal-db/scripts/legacy-transform_up.sql | 36 ++- 6 files changed, 711 insertions(+), 189 deletions(-) diff --git a/portal-db/init/001_schema.sql b/portal-db/init/001_schema.sql index 947dfc305..3a11a504c 100644 --- a/portal-db/init/001_schema.sql +++ b/portal-db/init/001_schema.sql @@ -268,6 +268,8 @@ CREATE TABLE services ( service_owner_address VARCHAR(50), network_id VARCHAR(42), active BOOLEAN DEFAULT FALSE, + beta BOOLEAN DEFAULT FALSE, + coming_soon BOOLEAN DEFAULT FALSE, quality_fallback_enabled BOOLEAN DEFAULT FALSE, hard_fallback_enabled BOOLEAN DEFAULT FALSE, svg_icon TEXT, @@ -275,7 +277,6 @@ CREATE TABLE services ( created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (network_id) REFERENCES networks(network_id), - FOREIGN KEY (service_owner_address) REFERENCES gateways(gateway_address) ); COMMENT ON TABLE services IS 'Supported blockchain services from the Pocket Network'; diff --git a/portal-db/scripts/hydrate-applications.sh b/portal-db/scripts/hydrate-applications.sh index d30b67a1a..20b465bea 100755 --- a/portal-db/scripts/hydrate-applications.sh +++ b/portal-db/scripts/hydrate-applications.sh @@ -23,28 +23,28 @@ print_status() { # ๐Ÿ” Function to validate required parameters validate_params() { - if [ -z "$NODE" ]; then - print_status $RED "โŒ Error: NODE parameter is required" + if [ "$FILE_MODE" != "true" ] && [ -z "$APPLICATION_ADDRESSES" ]; then + print_status $RED "โŒ Error: Either --apps or --file is required" exit 1 fi - if [ -z "$NETWORK" ]; then - print_status $RED "โŒ Error: NETWORK parameter is required" + if [ "$FILE_MODE" = "true" ] && [ -z "$APPLICATION_FILE" ]; then + print_status $RED "โŒ Error: --file parameter requires a file path" exit 1 fi - if [ -z "$DB_CONNECTION_STRING" ]; then - print_status $RED "โŒ Error: DB_CONNECTION_STRING environment variable is required" + if [ -z "$NODE" ]; then + print_status $RED "โŒ Error: --node parameter is required" exit 1 fi - if [ "$FILE_MODE" != "true" ] && [ -z "$APPLICATION_ADDRESSES" ]; then - print_status $RED "โŒ Error: APPLICATION_ADDRESSES parameter is required when not using file mode" + if [ -z "$NETWORK" ]; then + print_status $RED "โŒ Error: --chain-id parameter is required" exit 1 fi - if [ "$FILE_MODE" = "true" ] && [ -z "$APPLICATION_FILE" ]; then - print_status $RED "โŒ Error: APPLICATION_FILE parameter is required when using file mode" + if [ -z "$DB_CONNECTION_STRING" ]; then + print_status $RED "โŒ Error: --db-string parameter is required" exit 1 fi } @@ -71,26 +71,38 @@ insert_application() { local stake_amount=$4 local stake_denom=$5 local network_id=$6 + local private_key_hex=$7 echo -e " ๐Ÿ’พ Inserting application ${CYAN}$app_address${NC} into database..." + # Prepare the private key field - use NULL if empty + local private_key_field="NULL" + if [ -n "$private_key_hex" ]; then + private_key_field="'$private_key_hex'" + fi + # Use psql to insert the application data local db_result db_result=$(psql "$DB_CONNECTION_STRING" -c " - INSERT INTO applications (application_address, gateway_address, service_id, stake_amount, stake_denom, network_id) - VALUES ('$app_address', '$gateway_address', '$service_id', $stake_amount, '$stake_denom', '$network_id') + INSERT INTO applications (application_address, gateway_address, service_id, stake_amount, stake_denom, network_id, application_private_key_hex) + VALUES ('$app_address', '$gateway_address', '$service_id', $stake_amount, '$stake_denom', '$network_id', $private_key_field) ON CONFLICT (application_address) DO UPDATE SET gateway_address = EXCLUDED.gateway_address, service_id = EXCLUDED.service_id, stake_amount = EXCLUDED.stake_amount, stake_denom = EXCLUDED.stake_denom, network_id = EXCLUDED.network_id, + application_private_key_hex = COALESCE(EXCLUDED.application_private_key_hex, applications.application_private_key_hex), updated_at = CURRENT_TIMESTAMP; " 2>&1) local exit_code=$? if [ $exit_code -eq 0 ]; then - echo -e " โœ… Successfully inserted/updated application: ${CYAN}$app_address${NC}" + local key_status="without private key" + if [ -n "$private_key_hex" ]; then + key_status="with private key" + fi + echo -e " โœ… Successfully inserted/updated application: ${CYAN}$app_address${NC} ($key_status)" else echo -e " โŒ Failed to insert application: ${CYAN}$app_address${NC}" echo -e " ๐Ÿ“‹ Database error: ${RED}$db_result${NC}" @@ -98,7 +110,7 @@ insert_application() { fi } -# ๐Ÿ“ Function to read application addresses from file +# ๐Ÿ“ Function to read application data from file read_application_file() { local file_path=$1 @@ -112,8 +124,31 @@ read_application_file() { exit 1 fi - # Read file and filter out empty lines and comments - grep -v '^#' "$file_path" | grep -v '^[[:space:]]*$' | tr '\n' ',' + # Read file and process each line + # Format: address [service_id] [private_key] + local app_data="" + while IFS= read -r line || [[ -n "$line" ]]; do + # Skip empty lines and comments + [[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue + + # Parse the line: address service_id private_key (space/tab separated) + local address=$(echo "$line" | awk '{print $1}') + local service_id=$(echo "$line" | awk '{print $2}') + local private_key=$(echo "$line" | awk '{print $3}') + + # Skip if no address found + [[ -z "$address" ]] && continue + + # Store the data in format: address|service_id|private_key + # Empty fields will be empty strings + if [ -n "$app_data" ]; then + app_data="${app_data},${address}|${service_id}|${private_key}" + else + app_data="${address}|${service_id}|${private_key}" + fi + done < "$file_path" + + echo "$app_data" } # ๐ŸŽฏ Main function @@ -132,13 +167,12 @@ main() { # Validate required parameters validate_params - # Check if pocketd command is available + # Check if required commands are available if ! command -v pocketd &> /dev/null; then print_status $RED "โŒ Error: pocketd command not found. Please ensure it's installed and in PATH." exit 1 fi - # Check if psql command is available if ! command -v psql &> /dev/null; then print_status $RED "โŒ Error: psql command not found. Please ensure PostgreSQL client is installed." exit 1 @@ -153,20 +187,20 @@ main() { print_status $GREEN "โœ… Database connection successful" echo "" - # Get application addresses from file or command line - local app_addresses_string + # Get application data from file or command line + local app_data_string + if [ "$FILE_MODE" = "true" ]; then - print_status $YELLOW "๐Ÿ“ Reading application addresses from file: $APPLICATION_FILE" - app_addresses_string=$(read_application_file "$APPLICATION_FILE") - # Remove trailing comma - app_addresses_string=${app_addresses_string%,} - print_status $GREEN "โœ… Read application addresses from file" + print_status $YELLOW "๐Ÿ“ Reading application data from file: $APPLICATION_FILE" + app_data_string=$(read_application_file "$APPLICATION_FILE") + print_status $GREEN "โœ… Read application data from file" else - app_addresses_string="$APPLICATION_ADDRESSES" + # For command line mode, format as address|| (no service override or private key) + app_data_string=$(echo "$APPLICATION_ADDRESSES" | sed 's/,/||,/g' | sed 's/$/||/') fi - # Convert comma-separated application addresses to array - IFS=',' read -ra APP_ARRAY <<< "$app_addresses_string" + # Convert comma-separated data to array + IFS=',' read -ra APP_ARRAY <<< "$app_data_string" total_applications=${#APP_ARRAY[@]} processed=0 @@ -176,13 +210,35 @@ main() { print_status $PURPLE "๐Ÿ”„ Processing $total_applications application addresses..." echo "" - # Process each application address - for app_address in "${APP_ARRAY[@]}"; do + # Process each application + for app_entry in "${APP_ARRAY[@]}"; do + # Extract address, service_id, and private key from entry (format: address|service_id|private_key) + IFS='|' read -r app_address service_override private_key_hex <<< "$app_entry" + # Trim whitespace app_address=$(echo "$app_address" | xargs) + service_override=$(echo "$service_override" | xargs) + private_key_hex=$(echo "$private_key_hex" | xargs) processed=$((processed + 1)) - echo -e "๐Ÿ” Processing application ${BLUE}$processed/${total_applications}${NC}: ${CYAN}$app_address${NC}" + + # Show status indicators + local key_indicator="" + local service_indicator="" + + if [ -n "$private_key_hex" ]; then + key_indicator=" ${GREEN}[+key]${NC}" + else + key_indicator=" ${YELLOW}[-key]${NC}" + fi + + if [ -n "$service_override" ]; then + service_indicator=" ${BLUE}[+svc:$service_override]${NC}" + else + service_indicator=" ${YELLOW}[-svc]${NC}" + fi + + echo -e "๐Ÿ” Processing application ${BLUE}$processed/${total_applications}${NC}: ${CYAN}$app_address${NC}$key_indicator$service_indicator" # Query application information using pocketd with timeout print_status $YELLOW " ๐Ÿ“ก Fetching application info from blockchain..." @@ -199,7 +255,7 @@ main() { continue fi - # Check if application exists (look for error indicators) + # Check if application exists if echo "$app_output" | grep -q "not found\|error\|Error"; then print_status $RED " โŒ Application not found or error occurred for $app_address" print_status $RED " ๐Ÿ“‹ Response: $app_output" @@ -221,20 +277,27 @@ main() { continue fi - IFS='|' read -r parsed_address gateway_address service_id stake_amount stake_denom <<< "$app_info" + IFS='|' read -r parsed_address gateway_address blockchain_service_id stake_amount stake_denom <<< "$app_info" - if [ -z "$parsed_address" ] || [ -z "$gateway_address" ] || [ -z "$service_id" ] || [ -z "$stake_amount" ] || [ -z "$stake_denom" ]; then + if [ -z "$parsed_address" ] || [ -z "$gateway_address" ] || [ -z "$blockchain_service_id" ] || [ -z "$stake_amount" ] || [ -z "$stake_denom" ]; then print_status $RED " โŒ Invalid application information parsed for $app_address" - print_status $RED " ๐Ÿ“‹ Parsed data: address='$parsed_address' gateway='$gateway_address' service='$service_id' amount='$stake_amount' denom='$stake_denom'" + print_status $RED " ๐Ÿ“‹ Parsed data: address='$parsed_address' gateway='$gateway_address' service='$blockchain_service_id' amount='$stake_amount' denom='$stake_denom'" failed=$((failed + 1)) echo "" continue fi - echo -e " โœ… Parsed - Gateway: ${CYAN}$gateway_address${NC}, Service: ${CYAN}$service_id${NC}, Stake: ${CYAN}$stake_amount${NC} ${CYAN}$stake_denom${NC}" + # Determine which service ID to use + local final_service_id="$blockchain_service_id" + if [ -n "$service_override" ]; then + final_service_id="$service_override" + echo -e " ๐Ÿ”„ Using service override: ${YELLOW}$blockchain_service_id${NC} โ†’ ${CYAN}$final_service_id${NC}" + fi + + echo -e " โœ… Parsed - Gateway: ${CYAN}$gateway_address${NC}, Service: ${CYAN}$final_service_id${NC}, Stake: ${CYAN}$stake_amount${NC} ${CYAN}$stake_denom${NC}" - # Insert into database - if insert_application "$parsed_address" "$gateway_address" "$service_id" "$stake_amount" "$stake_denom" "$NETWORK"; then + # Insert application into database + if insert_application "$parsed_address" "$gateway_address" "$final_service_id" "$stake_amount" "$stake_denom" "$NETWORK" "$private_key_hex"; then successful=$((successful + 1)) else failed=$((failed + 1)) @@ -259,56 +322,166 @@ main() { # ๐Ÿ“š Usage information usage() { - echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS] ${NC}" + echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS]${NC}" echo "" - echo -e "${YELLOW}๐Ÿ“ Parameters:${NC}" - echo -e " ${CYAN}application_addresses${NC} Comma-separated list of application addresses" - echo -e " ${CYAN}rpc_node${NC} RPC node endpoint" - echo -e " ${CYAN}network_id${NC} Network/chain ID" + echo -e "${YELLOW}๐Ÿ“ Required Parameters:${NC}" + echo -e " ${CYAN}--apps ${NC} Comma-separated list of application addresses" + echo -e " ${CYAN}--file ${NC} Read application data from file" + echo -e " ${CYAN}-f ${NC} Short form of --file" + echo -e " ${CYAN}--node ${NC} RPC node endpoint" + echo -e " ${CYAN}--chain-id ${NC} Network/chain ID" + echo -e " ${CYAN}--db-string ${NC} PostgreSQL connection string" echo "" - echo -e "${YELLOW}๐Ÿ”ง Options:${NC}" - echo -e " ${CYAN}-h, --help${NC} Show this help message" - echo -e " ${CYAN}-f, --file${NC} Use file mode - read application addresses from file (one per line)" - echo -e " ${CYAN}-d, --debug${NC} Enable debug output" + echo -e "${YELLOW}๐Ÿ”ง Optional Parameters:${NC}" + echo -e " ${CYAN}-h, --help${NC} Show this help message" + echo -e " ${CYAN}-d, --debug${NC} Enable debug output" echo "" - echo -e "${YELLOW}๐ŸŒ Environment Variables:${NC}" - echo -e " ${CYAN}DB_CONNECTION_STRING${NC} PostgreSQL connection string" - echo -e " ${CYAN}DEBUG${NC} Set to 'true' to enable debug output" + echo -e "${YELLOW}๐Ÿ“‹ File Format:${NC}" + echo -e " โ€ข Format: ${CYAN}address [service_id] [private_key]${NC}" + echo -e " โ€ข Only address is required, service_id and private_key are optional" + echo -e " โ€ข Fields separated by spaces or tabs" + echo -e " โ€ข Lines starting with # are ignored" + echo "" + echo -e "${YELLOW}๐Ÿ“‹ File Examples:${NC}" + echo -e " ${GREEN}# applications.txt${NC}" + echo -e " ${GREEN}pokt1address123${NC} ${GRAY}# address only${NC}" + echo -e " ${GREEN}pokt1address456 ethereum${NC} ${GRAY}# address + service override${NC}" + echo -e " ${GREEN}pokt1address789 polygon deadbeef123${NC} ${GRAY}# address + service + private key${NC}" + echo -e " ${GREEN}pokt1address012 \"\" abc123456${NC} ${GRAY}# address + private key (no service override)${NC}" echo "" echo -e "${YELLOW}๐Ÿ’ก Examples:${NC}" - echo -e " ${YELLOW}# Using comma-separated application addresses:${NC}" - echo -e " ${GREEN}export DB_CONNECTION_STRING='postgresql://user:pass@localhost:5435/portal_db'${NC}" - echo -e " ${GREEN}$0 'pokt1abc123,pokt1def456' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${YELLOW}# Using comma-separated addresses:${NC}" + echo -e " ${GREEN}$0 --apps 'pokt1abc123,pokt1def456' \\\\${NC}" + echo -e " ${GREEN} --node 'https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id 'pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string 'postgresql://user:pass@localhost:5432/portal_db'${NC}" echo "" echo -e " ${YELLOW}# Using file mode:${NC}" - echo -e " ${GREEN}echo -e 'pokt1abc123\\\npokt1def456' > applications.txt${NC}" - echo -e " ${GREEN}$0 --file applications.txt 'https://rpc.example.com:443' 'pocket'${NC}" - echo "" - echo -e " ${YELLOW}# With debug output:${NC}" - echo -e " ${GREEN}$0 --debug 'pokt1abc123' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${GREEN}$0 --file applications.txt \\\\${NC}" + echo -e " ${GREEN} --node 'https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id 'pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string 'postgresql://user:pass@localhost:5432/portal_db'${NC}" echo "" } -# ๐Ÿšช Entry point -# Parse arguments and flags +# ๐Ÿšช Entry point - Initialize variables DEBUG_MODE=false FILE_MODE=false +APPLICATION_ADDRESSES="" +APPLICATION_FILE="" +NODE="" +NETWORK="" +DB_CONNECTION_STRING="" +# Parse arguments while [ $# -gt 0 ]; do case $1 in - -h|--help|help) + -h|--help) usage exit 0 ;; -d|--debug) DEBUG_MODE=true - DEBUG=true shift ;; - -f|--file) + --apps=*) + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --apps and --file" + exit 1 + fi + APPLICATION_ADDRESSES="${1#*=}" + if [ -z "$APPLICATION_ADDRESSES" ]; then + print_status $RED "โŒ Error: --apps requires a value" + exit 1 + fi + shift + ;; + --apps) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --apps requires a value" + exit 1 + fi + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --apps and --file" + exit 1 + fi + APPLICATION_ADDRESSES="$2" + shift 2 + ;; + --file=*|-f=*) + if [ -n "$APPLICATION_ADDRESSES" ]; then + print_status $RED "โŒ Error: Cannot use both --apps and --file" + exit 1 + fi + APPLICATION_FILE="${1#*=}" + if [ -z "$APPLICATION_FILE" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi FILE_MODE=true shift ;; + --file|-f) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi + if [ -n "$APPLICATION_ADDRESSES" ]; then + print_status $RED "โŒ Error: Cannot use both --apps and --file" + exit 1 + fi + FILE_MODE=true + APPLICATION_FILE="$2" + shift 2 + ;; + --node=*) + NODE="${1#*=}" + if [ -z "$NODE" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + shift + ;; + --node) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + NODE="$2" + shift 2 + ;; + --chain-id=*) + NETWORK="${1#*=}" + if [ -z "$NETWORK" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + shift + ;; + --chain-id) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + NETWORK="$2" + shift 2 + ;; + --db-string=*) + DB_CONNECTION_STRING="${1#*=}" + if [ -z "$DB_CONNECTION_STRING" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi + shift + ;; + --db-string) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi + DB_CONNECTION_STRING="$2" + shift 2 + ;; -*) print_status $RED "โŒ Error: Unknown option $1" echo "" @@ -316,37 +489,26 @@ while [ $# -gt 0 ]; do exit 1 ;; *) - break + print_status $RED "โŒ Error: Unexpected argument $1. All parameters must be specified with flags." + echo "" + usage + exit 1 ;; esac done -# Check if we have the right number of remaining arguments -if [ "$FILE_MODE" = "true" ]; then - if [ $# -ne 3 ]; then - print_status $RED "โŒ Error: Invalid number of arguments for file mode" - echo "" - usage - exit 1 - fi - APPLICATION_FILE="$1" - NODE="$2" - NETWORK="$3" -else - if [ $# -ne 3 ]; then - print_status $RED "โŒ Error: Invalid number of arguments" - echo "" - usage - exit 1 - fi - APPLICATION_ADDRESSES="$1" - NODE="$2" - NETWORK="$3" -fi - # Enable debug mode if DEBUG environment variable is set if [ "$DEBUG" = "true" ]; then DEBUG_MODE=true fi -main \ No newline at end of file +# Validate that we have either apps or file mode +if [ "$FILE_MODE" != "true" ] && [ -z "$APPLICATION_ADDRESSES" ]; then + print_status $RED "โŒ Error: Either --apps or --file must be specified" + echo "" + usage + exit 1 +fi + +# Run the main function +main diff --git a/portal-db/scripts/hydrate-gateways.sh b/portal-db/scripts/hydrate-gateways.sh index 6242f2d75..b8adf487c 100755 --- a/portal-db/scripts/hydrate-gateways.sh +++ b/portal-db/scripts/hydrate-gateways.sh @@ -23,23 +23,28 @@ print_status() { # ๐Ÿ” Function to validate required parameters validate_params() { - if [ -z "$GATEWAY_ADDRESSES" ]; then - print_status $RED "โŒ Error: GATEWAY_ADDRESSES parameter is required" + if [ "$FILE_MODE" != "true" ] && [ -z "$GATEWAY_ADDRESSES" ]; then + print_status $RED "โŒ Error: --gateways parameter is required when not using --file mode" + exit 1 + fi + + if [ "$FILE_MODE" = "true" ] && [ -z "$GATEWAY_FILE" ]; then + print_status $RED "โŒ Error: --file parameter requires a file path" exit 1 fi if [ -z "$NODE" ]; then - print_status $RED "โŒ Error: NODE parameter is required" + print_status $RED "โŒ Error: --node parameter is required" exit 1 fi if [ -z "$NETWORK" ]; then - print_status $RED "โŒ Error: NETWORK parameter is required" + print_status $RED "โŒ Error: --chain-id parameter is required" exit 1 fi if [ -z "$DB_CONNECTION_STRING" ]; then - print_status $RED "โŒ Error: DB_CONNECTION_STRING environment variable is required" + print_status $RED "โŒ Error: --db-string parameter is required" exit 1 fi } @@ -61,24 +66,36 @@ insert_gateway() { local stake_amount=$2 local stake_denom=$3 local network_id=$4 + local private_key_hex=$5 echo -e " ๐Ÿ’พ Inserting gateway ${CYAN}$address${NC} into database..." + # Prepare the private key field - use NULL if empty + local private_key_field="NULL" + if [ -n "$private_key_hex" ]; then + private_key_field="'$private_key_hex'" + fi + # Use psql to insert the gateway data local db_result db_result=$(psql "$DB_CONNECTION_STRING" -c " - INSERT INTO gateways (gateway_address, stake_amount, stake_denom, network_id) - VALUES ('$address', $stake_amount, '$stake_denom', '$network_id') + INSERT INTO gateways (gateway_address, stake_amount, stake_denom, network_id, gateway_private_key_hex) + VALUES ('$address', $stake_amount, '$stake_denom', '$network_id', $private_key_field) ON CONFLICT (gateway_address) DO UPDATE SET stake_amount = EXCLUDED.stake_amount, stake_denom = EXCLUDED.stake_denom, network_id = EXCLUDED.network_id, + gateway_private_key_hex = COALESCE(EXCLUDED.gateway_private_key_hex, gateways.gateway_private_key_hex), updated_at = CURRENT_TIMESTAMP; " 2>&1) local exit_code=$? if [ $exit_code -eq 0 ]; then - echo -e " โœ… Successfully inserted/updated gateway: ${CYAN}$address${NC}" + local key_status="without private key" + if [ -n "$private_key_hex" ]; then + key_status="with private key" + fi + echo -e " โœ… Successfully inserted/updated gateway: ${CYAN}$address${NC} ($key_status)" else echo -e " โŒ Failed to insert gateway: ${CYAN}$address${NC}" echo -e " ๐Ÿ“‹ Database error: ${RED}$db_result${NC}" @@ -86,11 +103,54 @@ insert_gateway() { fi } +# ๐Ÿ“ Function to read gateway addresses from file +read_gateway_file() { + local file_path=$1 + + if [ ! -f "$file_path" ]; then + print_status $RED "โŒ Error: Gateway file '$file_path' not found" + exit 1 + fi + + if [ ! -r "$file_path" ]; then + print_status $RED "โŒ Error: Gateway file '$file_path' is not readable" + exit 1 + fi + + # Read file and filter out empty lines and comments + # Process each line to extract address and optional private key + local addresses="" + while IFS= read -r line || [[ -n "$line" ]]; do + # Skip empty lines and comments + [[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue + + # Extract address and private key using tab/space separation + local address=$(echo "$line" | awk '{print $1}') + local private_key=$(echo "$line" | awk '{print $2}') + + # Skip if no address found + [[ -z "$address" ]] && continue + + # Store the data in format: address|private_key (empty if not provided) + if [ -n "$addresses" ]; then + addresses="${addresses},${address}|${private_key}" + else + addresses="${address}|${private_key}" + fi + done < "$file_path" + + echo "$addresses" +} + # ๐ŸŽฏ Main function main() { print_status $PURPLE "๐Ÿš€ Starting Gateway Hydration Process" echo -e "๐Ÿ“‹ Parameters:" - echo -e " โ€ข Gateway Addresses: ${CYAN}${GATEWAY_ADDRESSES}${NC}" + if [ "$FILE_MODE" = "true" ]; then + echo -e " โ€ข Gateway File: ${CYAN}${GATEWAY_FILE}${NC}" + else + echo -e " โ€ข Gateway Addresses: ${CYAN}${GATEWAY_ADDRESSES}${NC}" + fi echo -e " โ€ข RPC Node: ${CYAN}${NODE}${NC}" echo -e " โ€ข Network: ${CYAN}${NETWORK}${NC}" echo "" @@ -119,8 +179,19 @@ main() { print_status $GREEN "โœ… Database connection successful" echo "" + # Get gateway addresses from file or command line + local gateway_addresses_string + if [ "$FILE_MODE" = "true" ]; then + print_status $YELLOW "๐Ÿ“ Reading gateway addresses from file: $GATEWAY_FILE" + gateway_addresses_string=$(read_gateway_file "$GATEWAY_FILE") + print_status $GREEN "โœ… Read gateway addresses from file" + else + # For command line mode, format as address| (no private key) + gateway_addresses_string=$(echo "$GATEWAY_ADDRESSES" | sed 's/,/|,/g' | sed 's/$/|/') + fi + # Convert comma-separated addresses to array - IFS=',' read -ra ADDR_ARRAY <<< "$GATEWAY_ADDRESSES" + IFS=',' read -ra ADDR_ARRAY <<< "$gateway_addresses_string" total_addresses=${#ADDR_ARRAY[@]} processed=0 @@ -131,12 +202,25 @@ main() { echo "" # Process each gateway address - for address in "${ADDR_ARRAY[@]}"; do + for gateway_entry in "${ADDR_ARRAY[@]}"; do + # Extract address and private key from entry (format: address|private_key) + IFS='|' read -r address private_key_hex <<< "$gateway_entry" + # Trim whitespace address=$(echo "$address" | xargs) + private_key_hex=$(echo "$private_key_hex" | xargs) processed=$((processed + 1)) - echo -e "๐Ÿ” Processing gateway ${BLUE}$processed/${total_addresses}${NC}: ${CYAN}$address${NC}" + + # Show status with private key indicator + local key_indicator="" + if [ -n "$private_key_hex" ]; then + key_indicator=" ${GREEN}[+key]${NC}" + else + key_indicator=" ${YELLOW}[-key]${NC}" + fi + + echo -e "๐Ÿ” Processing gateway ${BLUE}$processed/${total_addresses}${NC}: ${CYAN}$address${NC}$key_indicator" # Query gateway information using pocketd with timeout print_status $YELLOW " ๐Ÿ“ก Fetching gateway info from blockchain..." @@ -187,7 +271,7 @@ main() { echo -e " โœ… Parsed - Amount: ${CYAN}$stake_amount${NC}, Denom: ${CYAN}$stake_denom${NC}" # Insert into database - if insert_gateway "$address" "$stake_amount" "$stake_denom" "$NETWORK"; then + if insert_gateway "$address" "$stake_amount" "$stake_denom" "$NETWORK" "$private_key_hex"; then successful=$((successful + 1)) else failed=$((failed + 1)) @@ -201,50 +285,91 @@ main() { print_status $BLUE " โ€ข Total Processed: $processed" print_status $GREEN " โ€ข Successful: $successful" print_status $RED " โ€ข Failed: $failed" - echo "" if [ $failed -gt 0 ]; then print_status $YELLOW "โš ๏ธ Some gateways failed to process. Check the output above for details." exit 1 else - print_status $GREEN "๐ŸŽ‰ All gateways processed successfully!" fi } # ๐Ÿ“š Usage information usage() { - echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS] ${NC}" + echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS]${NC}" echo "" - echo -e "${YELLOW}๐Ÿ“ Parameters:${NC}" - echo -e " ${CYAN}gateway_addresses${NC} Comma-separated list of gateway addresses" - echo -e " ${CYAN}rpc_node${NC} RPC node endpoint" - echo -e " ${CYAN}network_id${NC} Network/chain ID" + echo -e "${YELLOW}๐Ÿ“ Required Parameters:${NC}" + echo -e " ${CYAN}--gateways ${NC} Comma-separated list of gateway addresses" + echo -e " ${CYAN}--file ${NC} Read gateway addresses from file (one per line)" + echo -e " ${CYAN}--node ${NC} RPC node endpoint" + echo -e " ${CYAN}--chain-id ${NC} Network/chain ID" + echo -e " ${CYAN}--db-string ${NC} PostgreSQL connection string" echo "" - echo -e "${YELLOW}๐Ÿ”ง Options:${NC}" - echo -e " ${CYAN}-h, --help${NC} Show this help message" - echo -e " ${CYAN}-d, --debug${NC} Enable debug output" + echo -e "${YELLOW}๐Ÿ”ง Optional Parameters:${NC}" + echo -e " ${CYAN}-h, --help${NC} Show this help message" + echo -e " ${CYAN}-d, --debug${NC} Enable debug output" echo "" - echo -e "${YELLOW}๐ŸŒ Environment Variables:${NC}" - echo -e " ${CYAN}DB_CONNECTION_STRING${NC} PostgreSQL connection string" - echo -e " ${CYAN}DEBUG${NC} Set to 'true' to enable debug output" + echo -e "${YELLOW}๐Ÿ“‹ Notes:${NC}" + echo -e " โ€ข Either ${CYAN}--gateways${NC} or ${CYAN}--file${NC} is required (but not both)" + echo -e " โ€ข All other parameters are required" + echo -e " โ€ข File format: Each line should contain address and optionally private key separated by tab/space" + echo -e " โ€ข File format example: ${CYAN}pokt1gateway123${NC} ${CYAN}deadbeef789${NC}" + echo -e " โ€ข Lines with only address (no private key) are supported" echo "" echo -e "${YELLOW}๐Ÿ’ก Examples:${NC}" - echo -e " ${GREEN}export DB_CONNECTION_STRING='postgresql://user:pass@localhost:5435/portal_db'${NC}" - echo -e " ${GREEN}$0 'addr1,addr2,addr3' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${YELLOW}# Using comma-separated gateway addresses (space syntax):${NC}" + echo -e " ${GREEN}$0 --gateways 'addr1,addr2,addr3' \\\\${NC}" + echo -e " ${GREEN} --node 'https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id 'pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string 'postgresql://user:pass@localhost:5435/portal_db'${NC}" echo "" - echo -e " ${YELLOW}# With debug output:${NC}" - echo -e " ${GREEN}DEBUG=true $0 'addr1' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${YELLOW}# Using comma-separated gateway addresses (equals syntax):${NC}" + echo -e " ${GREEN}$0 --gateways='addr1,addr2,addr3' \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" + echo "" + echo -e " ${YELLOW}# Using file mode:${NC}" + echo -e " ${GREEN}echo -e 'addr1\\\naddr2\\\naddr3' > gateways.txt${NC}" + echo -e " ${GREEN}$0 --file=gateways.txt \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" + echo "" + echo -e " ${YELLOW}# Using file mode with private keys:${NC}" + echo -e " ${GREEN}cat > gateways_with_keys.txt << EOF${NC}" + echo -e " ${GREEN}pokt1gateway123${TAB}deadbeef123456789abcdef${NC}" + echo -e " ${GREEN}pokt1gateway456${TAB}987654321fedcba${NC}" + echo -e " ${GREEN}pokt1gateway789${NC}" + echo -e " ${GREEN}EOF${NC}" + echo -e " ${GREEN}$0 --file=gateways_with_keys.txt \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" echo "" - echo -e " ${YELLOW}# Or:${NC}" - echo -e " ${GREEN}$0 --debug 'addr1' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${YELLOW}# Using environment variable with mixed syntax:${NC}" + echo -e " ${GREEN}export PMAIN='--node=https://rpc.example.com:443 --chain-id=pocket'${NC}" + echo -e " ${GREEN}$0 --gateways='addr1' --db-string='postgresql://...' \$PMAIN${NC}" + echo "" + echo -e " ${YELLOW}# With debug output:${NC}" + echo -e " ${GREEN}$0 --debug --gateways='addr1' \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" echo "" } # ๐Ÿšช Entry point -# Parse arguments and flags +# Initialize variables DEBUG_MODE=false +FILE_MODE=false +GATEWAY_ADDRESSES="" +GATEWAY_FILE="" +NODE="" +NETWORK="" +DB_CONNECTION_STRING="" +# Parse arguments and flags while [ $# -gt 0 ]; do case $1 in -h|--help|help) @@ -256,6 +381,104 @@ while [ $# -gt 0 ]; do DEBUG=true shift ;; + --gateways=*) + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --gateways and --file" + exit 1 + fi + GATEWAY_ADDRESSES="${1#*=}" + if [ -z "$GATEWAY_ADDRESSES" ]; then + print_status $RED "โŒ Error: --gateways requires a value" + exit 1 + fi + shift + ;; + --gateways) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --gateways requires a value" + exit 1 + fi + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --gateways and --file" + exit 1 + fi + GATEWAY_ADDRESSES="$2" + shift 2 + ;; + --file=*) + if [ -n "$GATEWAY_ADDRESSES" ]; then + print_status $RED "โŒ Error: Cannot use both --gateways and --file" + exit 1 + fi + GATEWAY_FILE="${1#*=}" + if [ -z "$GATEWAY_FILE" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi + FILE_MODE=true + shift + ;; + --file) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi + if [ -n "$GATEWAY_ADDRESSES" ]; then + print_status $RED "โŒ Error: Cannot use both --gateways and --file" + exit 1 + fi + FILE_MODE=true + GATEWAY_FILE="$2" + shift 2 + ;; + --node=*) + NODE="${1#*=}" + if [ -z "$NODE" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + shift + ;; + --node) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + NODE="$2" + shift 2 + ;; + --chain-id=*) + NETWORK="${1#*=}" + if [ -z "$NETWORK" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + shift + ;; + --chain-id) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + NETWORK="$2" + shift 2 + ;; + --db-string=*) + DB_CONNECTION_STRING="${1#*=}" + if [ -z "$DB_CONNECTION_STRING" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi + shift + ;; + --db-string) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi + DB_CONNECTION_STRING="$2" + shift 2 + ;; -*) print_status $RED "โŒ Error: Unknown option $1" echo "" @@ -263,27 +486,25 @@ while [ $# -gt 0 ]; do exit 1 ;; *) - break + print_status $RED "โŒ Error: Unexpected argument $1. All parameters must be specified with flags." + echo "" + usage + exit 1 ;; esac done -# Check if we have the right number of remaining arguments -if [ $# -ne 3 ]; then - print_status $RED "โŒ Error: Invalid number of arguments" - echo "" - usage - exit 1 -fi - -GATEWAY_ADDRESSES="$1" -NODE="$2" -NETWORK="$3" - # Enable debug mode if DEBUG environment variable is set if [ "$DEBUG" = "true" ]; then DEBUG_MODE=true fi +# Check that we have either gateways or file mode +if [ "$FILE_MODE" != "true" ] && [ -z "$GATEWAY_ADDRESSES" ]; then + print_status $RED "โŒ Error: Either --gateways or --file must be specified" + echo "" + usage + exit 1 +fi -main \ No newline at end of file +main diff --git a/portal-db/scripts/hydrate-services.sh b/portal-db/scripts/hydrate-services.sh index 1d2fe9cd5..1ba692929 100755 --- a/portal-db/scripts/hydrate-services.sh +++ b/portal-db/scripts/hydrate-services.sh @@ -24,27 +24,27 @@ print_status() { # ๐Ÿ” Function to validate required parameters validate_params() { if [ -z "$NODE" ]; then - print_status $RED "โŒ Error: NODE parameter is required" + print_status $RED "โŒ Error: --node parameter is required" exit 1 fi if [ -z "$NETWORK" ]; then - print_status $RED "โŒ Error: NETWORK parameter is required" + print_status $RED "โŒ Error: --chain-id parameter is required" exit 1 fi if [ -z "$DB_CONNECTION_STRING" ]; then - print_status $RED "โŒ Error: DB_CONNECTION_STRING environment variable is required" + print_status $RED "โŒ Error: --db-string parameter is required" exit 1 fi if [ "$FILE_MODE" != "true" ] && [ -z "$SERVICE_IDS" ]; then - print_status $RED "โŒ Error: SERVICE_IDS parameter is required when not using file mode" + print_status $RED "โŒ Error: --services parameter is required when not using --file mode" exit 1 fi if [ "$FILE_MODE" = "true" ] && [ -z "$SERVICE_FILE" ]; then - print_status $RED "โŒ Error: SERVICE_FILE parameter is required when using file mode" + print_status $RED "โŒ Error: --file parameter requires a file path" exit 1 fi } @@ -255,41 +255,66 @@ main() { # ๐Ÿ“š Usage information usage() { - echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS] ${NC}" + echo -e "${PURPLE}๐Ÿ”ง Usage:${NC} ${BLUE}$0 [OPTIONS]${NC}" echo "" - echo -e "${YELLOW}๐Ÿ“ Parameters:${NC}" - echo -e " ${CYAN}service_ids${NC} Comma-separated list of service IDs" - echo -e " ${CYAN}rpc_node${NC} RPC node endpoint" - echo -e " ${CYAN}network_id${NC} Network/chain ID" + echo -e "${YELLOW}๐Ÿ“ Required Parameters:${NC}" + echo -e " ${CYAN}--services ${NC} Comma-separated list of service IDs" + echo -e " ${CYAN}--file ${NC} Read service IDs from file (one per line)" + echo -e " ${CYAN}--node ${NC} RPC node endpoint" + echo -e " ${CYAN}--chain-id ${NC} Network/chain ID" + echo -e " ${CYAN}--db-string ${NC} PostgreSQL connection string" echo "" - echo -e "${YELLOW}๐Ÿ”ง Options:${NC}" - echo -e " ${CYAN}-h, --help${NC} Show this help message" - echo -e " ${CYAN}-f, --file${NC} Use file mode - read service IDs from file (one per line)" - echo -e " ${CYAN}-d, --debug${NC} Enable debug output" + echo -e "${YELLOW}๐Ÿ”ง Optional Parameters:${NC}" + echo -e " ${CYAN}-h, --help${NC} Show this help message" + echo -e " ${CYAN}-d, --debug${NC} Enable debug output" echo "" - echo -e "${YELLOW}๐ŸŒ Environment Variables:${NC}" - echo -e " ${CYAN}DB_CONNECTION_STRING${NC} PostgreSQL connection string" - echo -e " ${CYAN}DEBUG${NC} Set to 'true' to enable debug output" + echo -e "${YELLOW}๐Ÿ“‹ Notes:${NC}" + echo -e " โ€ข Either ${CYAN}--services${NC} or ${CYAN}--file${NC} is required (but not both)" + echo -e " โ€ข All other parameters are required" echo "" echo -e "${YELLOW}๐Ÿ’ก Examples:${NC}" - echo -e " ${YELLOW}# Using comma-separated service IDs:${NC}" - echo -e " ${GREEN}export DB_CONNECTION_STRING='postgresql://user:pass@localhost:5435/portal_db'${NC}" - echo -e " ${GREEN}$0 'eth,poly,solana,xrplevm' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${YELLOW}# Using comma-separated service IDs (space syntax):${NC}" + echo -e " ${GREEN}$0 --services 'eth,poly,solana,xrplevm' \\\\${NC}" + echo -e " ${GREEN} --node 'https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id 'pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string 'postgresql://user:pass@localhost:5435/portal_db'${NC}" + echo "" + echo -e " ${YELLOW}# Using comma-separated service IDs (equals syntax):${NC}" + echo -e " ${GREEN}$0 --services='eth,poly,solana,xrplevm' \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" echo "" echo -e " ${YELLOW}# Using file mode:${NC}" echo -e " ${GREEN}echo -e 'eth\\\npoly\\\nsolana\\\nxrplevm' > services.txt${NC}" - echo -e " ${GREEN}$0 --file services.txt 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${GREEN}$0 --file=services.txt \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" + echo "" + echo -e " ${YELLOW}# Using environment variable with mixed syntax:${NC}" + echo -e " ${GREEN}export PMAIN='--node=https://rpc.example.com:443 --chain-id=pocket'${NC}" + echo -e " ${GREEN}$0 --services='eth' --db-string='postgresql://...' \$PMAIN${NC}" echo "" echo -e " ${YELLOW}# With debug output:${NC}" - echo -e " ${GREEN}$0 --debug 'eth' 'https://rpc.example.com:443' 'pocket'${NC}" + echo -e " ${GREEN}$0 --debug --services='eth' \\\\${NC}" + echo -e " ${GREEN} --node='https://rpc.example.com:443' \\\\${NC}" + echo -e " ${GREEN} --chain-id='pocket' \\\\${NC}" + echo -e " ${GREEN} --db-string='postgresql://user:pass@localhost:5435/portal_db'${NC}" echo "" } # ๐Ÿšช Entry point -# Parse arguments and flags +# Initialize variables DEBUG_MODE=false FILE_MODE=false +SERVICE_IDS="" +SERVICE_FILE="" +NODE="" +NETWORK="" +DB_CONNECTION_STRING="" +# Parse arguments and flags while [ $# -gt 0 ]; do case $1 in -h|--help|help) @@ -301,10 +326,104 @@ while [ $# -gt 0 ]; do DEBUG=true shift ;; - -f|--file) + --services=*) + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --services and --file" + exit 1 + fi + SERVICE_IDS="${1#*=}" + if [ -z "$SERVICE_IDS" ]; then + print_status $RED "โŒ Error: --services requires a value" + exit 1 + fi + shift + ;; + --services) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --services requires a value" + exit 1 + fi + if [ "$FILE_MODE" = "true" ]; then + print_status $RED "โŒ Error: Cannot use both --services and --file" + exit 1 + fi + SERVICE_IDS="$2" + shift 2 + ;; + --file=*) + if [ -n "$SERVICE_IDS" ]; then + print_status $RED "โŒ Error: Cannot use both --services and --file" + exit 1 + fi + SERVICE_FILE="${1#*=}" + if [ -z "$SERVICE_FILE" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi + FILE_MODE=true + shift + ;; + --file) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --file requires a file path" + exit 1 + fi + if [ -n "$SERVICE_IDS" ]; then + print_status $RED "โŒ Error: Cannot use both --services and --file" + exit 1 + fi FILE_MODE=true + SERVICE_FILE="$2" + shift 2 + ;; + --node=*) + NODE="${1#*=}" + if [ -z "$NODE" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + shift + ;; + --node) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --node requires a value" + exit 1 + fi + NODE="$2" + shift 2 + ;; + --chain-id=*) + NETWORK="${1#*=}" + if [ -z "$NETWORK" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + shift + ;; + --chain-id) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --chain-id requires a value" + exit 1 + fi + NETWORK="$2" + shift 2 + ;; + --db-string=*) + DB_CONNECTION_STRING="${1#*=}" + if [ -z "$DB_CONNECTION_STRING" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi shift ;; + --db-string) + if [ -z "$2" ]; then + print_status $RED "โŒ Error: --db-string requires a value" + exit 1 + fi + DB_CONNECTION_STRING="$2" + shift 2 + ;; -*) print_status $RED "โŒ Error: Unknown option $1" echo "" @@ -312,37 +431,25 @@ while [ $# -gt 0 ]; do exit 1 ;; *) - break + print_status $RED "โŒ Error: Unexpected argument $1. All parameters must be specified with flags." + echo "" + usage + exit 1 ;; esac done -# Check if we have the right number of remaining arguments -if [ "$FILE_MODE" = "true" ]; then - if [ $# -ne 3 ]; then - print_status $RED "โŒ Error: Invalid number of arguments for file mode" - echo "" - usage - exit 1 - fi - SERVICE_FILE="$1" - NODE="$2" - NETWORK="$3" -else - if [ $# -ne 3 ]; then - print_status $RED "โŒ Error: Invalid number of arguments" - echo "" - usage - exit 1 - fi - SERVICE_IDS="$1" - NODE="$2" - NETWORK="$3" -fi - # Enable debug mode if DEBUG environment variable is set if [ "$DEBUG" = "true" ]; then DEBUG_MODE=true fi -main \ No newline at end of file +# Check that we have either services or file mode +if [ "$FILE_MODE" != "true" ] && [ -z "$SERVICE_IDS" ]; then + print_status $RED "โŒ Error: Either --services or --file must be specified" + echo "" + usage + exit 1 +fi + +main diff --git a/portal-db/scripts/legacy-transform_down.sql b/portal-db/scripts/legacy-transform_down.sql index eba67e6ca..2c0c20ee1 100644 --- a/portal-db/scripts/legacy-transform_down.sql +++ b/portal-db/scripts/legacy-transform_down.sql @@ -9,6 +9,9 @@ BEGIN; SET session_replication_role = replica; -- Delete only the data we inserted (in reverse dependency order) +--portal_application_allowlists (depends on portal_applications) +DELETE FROM portal.portal_application_allowlists; + -- portal_applications (depends on portal_accounts) DELETE FROM portal.portal_applications; diff --git a/portal-db/scripts/legacy-transform_up.sql b/portal-db/scripts/legacy-transform_up.sql index c69b2d3f4..b7014fbac 100644 --- a/portal-db/scripts/legacy-transform_up.sql +++ b/portal-db/scripts/legacy-transform_up.sql @@ -133,8 +133,6 @@ SELECT COALESCE(au.accepted, FALSE) as user_joined_account FROM "legacy-extract".account_users au; --- Transform the legacy portal_applications to the new portal_applications structure --- Consolidates some structures from multiple legacy tables INSERT INTO portal.portal_applications ( portal_application_id, portal_account_id, @@ -160,7 +158,11 @@ SELECT NULL as portal_application_user_limit_interval, NULL as portal_application_user_limit_rps, pa.description as portal_application_description, - pas.favorited_chain_ids as favorite_service_ids, + ( + SELECT ARRAY_AGG(c.blockchain) + FROM "legacy-extract".chains c + WHERE c.id = ANY(pas.favorited_chain_ids) + ) as favorite_service_ids, pas.secret_key as secret_key_hash, COALESCE(pas.secret_key_required, FALSE) as secret_key_required, CASE @@ -172,5 +174,31 @@ SELECT FROM "legacy-extract".portal_applications pa LEFT JOIN "legacy-extract".portal_application_settings pas ON pa.id = pas.application_id; -COMMIT; +-- Transform the legacy portal_application_whitelists to the new portal_application_allowlists +INSERT INTO portal.portal_application_allowlists ( + portal_application_id, + type, + value, + service_id, + created_at, + updated_at +) +SELECT + paw.application_id::uuid as portal_application_id, + CASE + WHEN paw.type = 'blockchains' THEN 'service_id'::allowlist_type + WHEN paw.type = 'origins' THEN 'origin'::allowlist_type + WHEN paw.type = 'contracts' THEN 'contract'::allowlist_type + ELSE paw.type::allowlist_type + END as type, + paw.value, + CASE + WHEN paw.type = 'blockchains' THEN c.blockchain + ELSE NULL + END as service_id, + paw.created_at, + paw.created_at as updated_at -- Using created_at since there's no updated_at in legacy +FROM "legacy-extract".portal_application_whitelists paw +LEFT JOIN "legacy-extract".chains c ON paw.chain_id = c.id; +COMMIT; From 1768561eaa6ceb9e239bf72b02b29e343ffe5b9d Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 18 Sep 2025 12:24:13 -0400 Subject: [PATCH 07/43] fixing bug with hydrate-applications --- portal-db/scripts/hydrate-applications.sh | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/portal-db/scripts/hydrate-applications.sh b/portal-db/scripts/hydrate-applications.sh index 20b465bea..dfcf023f6 100755 --- a/portal-db/scripts/hydrate-applications.sh +++ b/portal-db/scripts/hydrate-applications.sh @@ -49,16 +49,27 @@ validate_params() { fi } -# ๐Ÿ“Š Function to parse application info from pocketd output +# ๐Ÿ“Š Function to parse application info from pocketd JSON output parse_application_info() { local app_output="$1" - # Parse application information from YAML output - local app_address=$(echo "$app_output" | grep "address:" | head -1 | awk '{print $2}' | tr -d '"') - local gateway_address=$(echo "$app_output" | sed -n '/delegatee_gateway_addresses:/,/^[^ ]/p' | grep "^ - " | head -1 | sed 's/^ - //' | tr -d '"') - local service_id=$(echo "$app_output" | sed -n '/service_configs:/,/^[^ ]/p' | grep "service_id:" | head -1 | sed 's/.*service_id:[[:space:]]*//' | tr -d '"') - local stake_amount=$(echo "$app_output" | grep -A 5 "stake:" | grep "amount:" | head -1 | awk '{print $2}' | tr -d '"') - local stake_denom=$(echo "$app_output" | grep -A 5 "stake:" | grep "denom:" | head -1 | awk '{print $2}' | tr -d '"') + # Parse application information from JSON output + local app_address=$(echo "$app_output" | jq -r '.application.address // empty' 2>/dev/null) + local gateway_address=$(echo "$app_output" | jq -r '.application.delegatee_gateway_addresses[0] // empty' 2>/dev/null) + local service_id=$(echo "$app_output" | jq -r '.application.service_configs[0].service_id // empty' 2>/dev/null) + local stake_amount=$(echo "$app_output" | jq -r '.application.stake.amount // empty' 2>/dev/null) + local stake_denom=$(echo "$app_output" | jq -r '.application.stake.denom // empty' 2>/dev/null) + + # Fallback to text parsing if JSON parsing fails or jq is not available + if [ -z "$app_address" ] || ! command -v jq &> /dev/null; then + print_status $YELLOW " ๐Ÿ“ Using text parsing (jq not available or JSON parsing failed)" + # Parse application information from YAML/text output + app_address=$(echo "$app_output" | grep "address:" | head -1 | awk '{print $2}' | tr -d '"') + gateway_address=$(echo "$app_output" | sed -n '/delegatee_gateway_addresses:/,/^[^ ]/p' | grep "^ - " | head -1 | sed 's/^ - //' | tr -d '"') + service_id=$(echo "$app_output" | sed -n '/service_configs:/,/^[^ ]/p' | grep "service_id:" | head -1 | sed 's/.*service_id:[[:space:]]*//' | tr -d '"') + stake_amount=$(echo "$app_output" | grep -A 5 "stake:" | grep "amount:" | head -1 | awk '{print $2}' | tr -d '"') + stake_denom=$(echo "$app_output" | grep -A 5 "stake:" | grep "denom:" | head -1 | awk '{print $2}' | tr -d '"') + fi echo "$app_address|$gateway_address|$service_id|$stake_amount|$stake_denom" } @@ -178,6 +189,11 @@ main() { exit 1 fi + # Check if jq is available for JSON parsing + if ! command -v jq &> /dev/null; then + print_status $YELLOW "โš ๏ธ jq not found. Will use text parsing as fallback." + fi + # Test database connection print_status $YELLOW "๐Ÿ” Testing database connection..." if ! psql "$DB_CONNECTION_STRING" -c "SELECT 1;" > /dev/null 2>&1; then @@ -243,7 +259,7 @@ main() { # Query application information using pocketd with timeout print_status $YELLOW " ๐Ÿ“ก Fetching application info from blockchain..." - if ! app_output=$(timeout 30 pocketd q application show-application "$app_address" --node="$NODE" --chain-id="$NETWORK" 2>&1); then + if ! app_output=$(timeout 30 pocketd q application show-application "$app_address" --node "$NODE" --chain-id "$NETWORK" --output json 2>&1); then print_status $RED " โŒ Failed to fetch application info for $app_address" if echo "$app_output" | grep -q "timeout"; then print_status $RED " ๐Ÿ“‹ Error: Command timed out after 30 seconds" From 7a7645dcbc68e68974739bdaa0ad7091ae845b20 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 18 Sep 2025 14:27:43 -0400 Subject: [PATCH 08/43] fixing syntax error in schema after adjustments --- portal-db/init/001_schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal-db/init/001_schema.sql b/portal-db/init/001_schema.sql index 3a11a504c..3002874ff 100644 --- a/portal-db/init/001_schema.sql +++ b/portal-db/init/001_schema.sql @@ -276,7 +276,7 @@ CREATE TABLE services ( deleted_at TIMESTAMPTZ, created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (network_id) REFERENCES networks(network_id), + FOREIGN KEY (network_id) REFERENCES networks(network_id) ); COMMENT ON TABLE services IS 'Supported blockchain services from the Pocket Network'; From 3dccba2bdbc76018e41c4dc58c5f408d2030f4d1 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 18 Sep 2025 15:52:47 -0400 Subject: [PATCH 09/43] updating schema for legacy compatibility. fixes to transforms --- portal-db/init/001_schema.sql | 20 ++--- portal-db/scripts/legacy-transform_down.sql | 46 +++++------- portal-db/scripts/legacy-transform_up.sql | 83 +++++++++------------ 3 files changed, 62 insertions(+), 87 deletions(-) diff --git a/portal-db/init/001_schema.sql b/portal-db/init/001_schema.sql index 3002874ff..2878751cb 100644 --- a/portal-db/init/001_schema.sql +++ b/portal-db/init/001_schema.sql @@ -71,7 +71,7 @@ COMMENT ON COLUMN portal_plans.plan_rate_limit_rps IS 'Rate limit in requests pe -- Portal Accounts can have many applications and many users. Only 1 user can be the OWNER. -- When a new user signs up in the Portal, they automatically generate a personal account. CREATE TABLE portal_accounts ( - portal_account_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + portal_account_id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), organization_id INT, portal_plan_type VARCHAR(42) NOT NULL, user_account_name VARCHAR(42), @@ -101,7 +101,7 @@ COMMENT ON COLUMN portal_accounts.stripe_subscription_id IS 'Stripe subscription -- Portal users table -- Users can belong to multiple Accounts CREATE TABLE portal_users ( - portal_user_id SERIAL PRIMARY KEY, + portal_user_id VARCHAR(36) PRIMARY KEY, portal_user_email VARCHAR(255) NOT NULL UNIQUE, signed_up BOOLEAN DEFAULT FALSE, portal_admin BOOLEAN DEFAULT FALSE, @@ -123,7 +123,7 @@ COMMENT ON COLUMN portal_users.portal_admin IS 'Whether user has admin privilege CREATE TABLE contacts ( contact_id SERIAL PRIMARY KEY, organization_id INT, - portal_user_id INT, + portal_user_id VARCHAR(36), contact_telegram_handle VARCHAR(32), contact_twitter_handle VARCHAR(15), contact_linkedin_handle VARCHAR(30), @@ -156,8 +156,8 @@ COMMENT ON TABLE rbac IS 'Role definitions and their associated permissions'; -- Sets the role and access controls for a user on a particular account. CREATE TABLE portal_account_rbac ( id SERIAL PRIMARY KEY, - portal_account_id UUID NOT NULL, - portal_user_id INT NOT NULL, + portal_account_id VARCHAR(36) NOT NULL, + portal_user_id VARCHAR(36) NOT NULL, role_name VARCHAR(20) NOT NULL, user_joined_account BOOLEAN DEFAULT FALSE, FOREIGN KEY (portal_account_id) REFERENCES portal_accounts(portal_account_id) ON DELETE CASCADE, @@ -174,8 +174,8 @@ COMMENT ON TABLE portal_account_rbac IS 'User roles and permissions for specific -- Portal applications table -- Portal Accounts can have many Portal Applications that have associated settings. CREATE TABLE portal_applications ( - portal_application_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), - portal_account_id UUID NOT NULL, + portal_application_id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), + portal_account_id VARCHAR(36) NOT NULL, portal_application_name VARCHAR(42), emoji VARCHAR(16), portal_application_user_limit INT CHECK (portal_application_user_limit >= 0), @@ -202,8 +202,8 @@ COMMENT ON COLUMN portal_applications.secret_key_hash IS 'Hashed secret key for -- Users must be members of the parent Account in order to have access to a particular application CREATE TABLE portal_application_rbac ( id SERIAL PRIMARY KEY, - portal_application_id UUID NOT NULL, - portal_user_id INT NOT NULL, + portal_application_id VARCHAR(36) NOT NULL, + portal_user_id VARCHAR(36) NOT NULL, created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (portal_application_id) REFERENCES portal_applications(portal_application_id) ON DELETE CASCADE, @@ -343,7 +343,7 @@ COMMENT ON COLUMN applications.application_address IS 'Blockchain address of the -- Sets access controls to Portal Applications based on allowlist_type CREATE TABLE portal_application_allowlists ( id SERIAL PRIMARY KEY, - portal_application_id UUID NOT NULL, + portal_application_id VARCHAR(36) NOT NULL, type allowlist_type, value VARCHAR(255), service_id VARCHAR(42), diff --git a/portal-db/scripts/legacy-transform_down.sql b/portal-db/scripts/legacy-transform_down.sql index 2c0c20ee1..674c2e079 100644 --- a/portal-db/scripts/legacy-transform_down.sql +++ b/portal-db/scripts/legacy-transform_down.sql @@ -1,42 +1,30 @@ -- legacy-transform_down.sql - --- Undoes only the changes made by legacy-transform_up.sql --- This preserves any other data that might exist in the portal database +-- Rollback script to truncate all data inserted by legacy-transform_up.sql +-- This allows for clean re-testing of the migration BEGIN; --- Disable foreign key checks temporarily to avoid constraint issues -SET session_replication_role = replica; - --- Delete only the data we inserted (in reverse dependency order) ---portal_application_allowlists (depends on portal_applications) -DELETE FROM portal.portal_application_allowlists; +-- Truncate tables in reverse dependency order to avoid foreign key constraint issues --- portal_applications (depends on portal_accounts) -DELETE FROM portal.portal_applications; +-- 1. Remove portal application allowlists (depends on portal_applications) +TRUNCATE TABLE public.portal_application_allowlists RESTART IDENTITY CASCADE; --- portal_account_rbac (depends on portal_accounts and portal_users) -DELETE FROM portal.portal_account_rbac; +-- 2. Remove portal applications (depends on portal_accounts) +TRUNCATE TABLE public.portal_applications RESTART IDENTITY CASCADE; --- portal_accounts (depends on portal_plans) -DELETE FROM portal.portal_accounts; +-- 3. Remove portal account RBAC (depends on portal_accounts and portal_users) +TRUNCATE TABLE public.portal_account_rbac RESTART IDENTITY CASCADE; --- portal_users -DELETE FROM portal.portal_users; +-- 4. Remove RBAC roles +TRUNCATE TABLE public.rbac RESTART IDENTITY CASCADE; --- rbac (only the legacy roles we inserted) -DELETE FROM portal.rbac WHERE role_name IN ('LEGACY_ADMIN', 'LEGACY_OWNER', 'LEGACY_MEMBER'); +-- 5. Remove portal users +TRUNCATE TABLE public.portal_users RESTART IDENTITY CASCADE; --- portal_plans (only the specific plans we inserted) -DELETE FROM portal.portal_plans WHERE portal_plan_type IN ('PLAN_FREE', 'PLAN_UNLIMITED', 'PLAN_ENTERPRISE', 'PLAN_INTERNAL'); +-- 6. Remove portal accounts (depends on portal_plans) +TRUNCATE TABLE public.portal_accounts RESTART IDENTITY CASCADE; --- Re-enable foreign key checks -SET session_replication_role = DEFAULT; - --- Reset sequences to start from 1 (only for tables we populated) -ALTER SEQUENCE IF EXISTS portal_users_portal_user_id_seq RESTART WITH 1; -ALTER SEQUENCE IF EXISTS rbac_role_id_seq RESTART WITH 1; -ALTER SEQUENCE IF EXISTS portal_account_rbac_id_seq RESTART WITH 1; +-- 7. Remove portal plans (base table) +TRUNCATE TABLE public.portal_plans RESTART IDENTITY CASCADE; COMMIT; - diff --git a/portal-db/scripts/legacy-transform_up.sql b/portal-db/scripts/legacy-transform_up.sql index b7014fbac..ada12e6c1 100644 --- a/portal-db/scripts/legacy-transform_up.sql +++ b/portal-db/scripts/legacy-transform_up.sql @@ -1,15 +1,9 @@ --- legacy-transform_up.sql +-- legacy-transform_up.sql (updated without UUID casts and fixed enum casting) - --- Transform from Legacy Portal DB Data to New Portal DB --- Order of operations mimics the init script in PATH repo --- See: https://github.com/buildwithgrove/path BEGIN; --- We omit the organizations tables as these are net new and not a hard requirement for any subsequent tables - -- First populate the Portal Plans -INSERT INTO "portal".portal_plans ( +INSERT INTO public.portal_plans ( portal_plan_type, portal_plan_type_description, plan_usage_limit, @@ -20,14 +14,11 @@ INSERT INTO "portal".portal_plans ( VALUES ('PLAN_FREE', 'Free tier with limited usage', 1000000, 'month', 0, 2), ('PLAN_UNLIMITED', 'Unlimited Relays. Unlimited RPS.', 0, NULL, 0, 0), - -- Note that we rename ENTERPRISE -> PLAN_ENTERPRISE for consistency ('PLAN_ENTERPRISE', 'Special case for Legacy Enterprise customers', 0, NULL, 0, 0), - -- Introduce the new plan type so we can separate out Grove-owned services ('PLAN_INTERNAL', 'Plan for internal accounts', 0, NULL, 0, 0); -- Transform the legacy accounts to the new accounts structure --- If the plan doesn't match one of our new plan types, then move them to `PLAN_FREE` -INSERT INTO portal.portal_accounts ( +INSERT INTO public.portal_accounts ( portal_account_id, organization_id, portal_plan_type, @@ -45,8 +36,7 @@ INSERT INTO portal.portal_accounts ( updated_at ) SELECT - -- casts each legacy ID as a uuid - a.id::uuid as portal_account_id, + a.id as portal_account_id, NULL as organization_id, CASE WHEN a.plan_type = 'ENTERPRISE' THEN 'PLAN_ENTERPRISE' @@ -74,11 +64,11 @@ SELECT END as deleted_at, a.created_at, a.updated_at -FROM "legacy-extract".accounts a -LEFT JOIN "legacy-extract".account_integrations ai ON a.id = ai.account_id; +FROM legacy_extract.accounts a +LEFT JOIN legacy_extract.account_integrations ai ON a.id = ai.account_id; --- Transform the legacy users to the new users table and make sure to grab all relevant data -INSERT INTO portal.portal_users ( +-- Transform the legacy users to the new users table +INSERT INTO public.portal_users ( portal_user_id, portal_user_email, signed_up, @@ -95,35 +85,30 @@ SELECT NULL as deleted_at, u.created_at, u.updated_at -FROM "legacy-extract".users u; - --- Update the sequence after inserting users with specific IDs -SELECT setval('portal_users_portal_user_id_seq', (SELECT MAX(portal_user_id) FROM portal_users)); +FROM legacy_extract.users u; --- Load the RBAC Table with the basic roles we have today, to be adjusted later --- Note that we tag them with the `LEGACY_` prefix so we can parse these out later -INSERT INTO portal.rbac ( +-- Load the RBAC Table +INSERT INTO public.rbac ( role_id, role_name, permissions ) VALUES - (DEFAULT, 'LEGACY_ADMIN', ARRAY[]), - (DEFAULT, 'LEGACY_OWNER', ARRAY[]), - (DEFAULT, 'LEGACY_MEMBER', ARRAY[]); + (DEFAULT, 'LEGACY_ADMIN', ARRAY[]::VARCHAR[]), + (DEFAULT, 'LEGACY_OWNER', ARRAY[]::VARCHAR[]), + (DEFAULT, 'LEGACY_MEMBER', ARRAY[]::VARCHAR[]); -- Transform the legacy account_users table into the new portal_account_rbac --- Note that we transform the role names to include a `LEGACY_` prefix so these are easier --- to parse. -INSERT INTO portal.portal_account_rbac ( +-- Join on email since we're using new auto-generated portal_user_id values +INSERT INTO public.portal_account_rbac ( portal_account_id, portal_user_id, role_name, user_joined_account ) SELECT - au.account_id::uuid as portal_account_id, - au.user_id as portal_user_id, + au.account_id as portal_account_id, + pu.portal_user_id, -- Use the new auto-generated ID CASE WHEN au.role_name = 'ADMIN' THEN 'LEGACY_ADMIN' WHEN au.role_name = 'OWNER' THEN 'LEGACY_OWNER' @@ -131,9 +116,11 @@ SELECT ELSE au.role_name END as role_name, COALESCE(au.accepted, FALSE) as user_joined_account -FROM "legacy-extract".account_users au; +FROM legacy_extract.account_users au +JOIN legacy_extract.users lu ON au.user_id = lu.id +JOIN public.portal_users pu ON lu.email = pu.portal_user_email; -INSERT INTO portal.portal_applications ( +INSERT INTO public.portal_applications ( portal_application_id, portal_account_id, portal_application_name, @@ -150,17 +137,17 @@ INSERT INTO portal.portal_applications ( updated_at ) SELECT - pa.id::uuid as portal_application_id, - pa.account_id::uuid as portal_account_id, - pa.name as portal_application_name, + pa.id as portal_application_id, + pa.account_id as portal_account_id, + LEFT(pa.name, 42) as portal_application_name, -- Truncate to 42 chars pa.app_emoji as emoji, NULL as portal_application_user_limit, NULL as portal_application_user_limit_interval, NULL as portal_application_user_limit_rps, - pa.description as portal_application_description, + LEFT(pa.description, 255) as portal_application_description, ( SELECT ARRAY_AGG(c.blockchain) - FROM "legacy-extract".chains c + FROM legacy_extract.chains c WHERE c.id = ANY(pas.favorited_chain_ids) ) as favorite_service_ids, pas.secret_key as secret_key_hash, @@ -171,11 +158,11 @@ SELECT END as deleted_at, pa.created_at, COALESCE(pas.updated_at, pa.updated_at) as updated_at -FROM "legacy-extract".portal_applications pa -LEFT JOIN "legacy-extract".portal_application_settings pas ON pa.id = pas.application_id; +FROM legacy_extract.portal_applications pa +LEFT JOIN legacy_extract.portal_application_settings pas ON pa.id = pas.application_id; -- Transform the legacy portal_application_whitelists to the new portal_application_allowlists -INSERT INTO portal.portal_application_allowlists ( +INSERT INTO public.portal_application_allowlists ( portal_application_id, type, value, @@ -184,12 +171,11 @@ INSERT INTO portal.portal_application_allowlists ( updated_at ) SELECT - paw.application_id::uuid as portal_application_id, + paw.application_id as portal_application_id, CASE WHEN paw.type = 'blockchains' THEN 'service_id'::allowlist_type WHEN paw.type = 'origins' THEN 'origin'::allowlist_type WHEN paw.type = 'contracts' THEN 'contract'::allowlist_type - ELSE paw.type::allowlist_type END as type, paw.value, CASE @@ -197,8 +183,9 @@ SELECT ELSE NULL END as service_id, paw.created_at, - paw.created_at as updated_at -- Using created_at since there's no updated_at in legacy -FROM "legacy-extract".portal_application_whitelists paw -LEFT JOIN "legacy-extract".chains c ON paw.chain_id = c.id; + paw.created_at as updated_at +FROM legacy_extract.portal_application_whitelists paw +LEFT JOIN legacy_extract.chains c ON paw.chain_id = c.id +WHERE paw.type IN ('blockchains', 'origins', 'contracts'); -- Only process known types COMMIT; From 0cc5fe3461c39ed4a2e43853ff62c5cfd216ec14 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 18 Sep 2025 16:35:53 -0400 Subject: [PATCH 10/43] adding auth to schema. enhancing transform to bring over legacy auth tables --- portal-db/init/001_schema.sql | 24 +++++++++++++++++++ portal-db/scripts/legacy-transform_down.sql | 7 ++++-- portal-db/scripts/legacy-transform_up.sql | 26 +++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/portal-db/init/001_schema.sql b/portal-db/init/001_schema.sql index 2878751cb..11112b540 100644 --- a/portal-db/init/001_schema.sql +++ b/portal-db/init/001_schema.sql @@ -19,6 +19,13 @@ CREATE TYPE plan_interval AS ENUM ('day', 'month', 'year'); -- Origin - Allow specific IP addresses or URLs CREATE TYPE allowlist_type AS ENUM ('service_id', 'contract', 'origin'); +-- Add support for multiple auth providers offering different types +-- Easily extendable should additional authorization providers become necessary +-- or requested +-- For legacy support, only adding auth0 and its relevant types +CREATE TYPE portal_auth_provider AS ENUM ('auth0'); +CREATE TYPE portal_auth_type AS ENUM ('auth0_github', 'auth0_username', 'auth0_google'); + -- ============================================================================ -- CORE ORGANIZATIONAL TABLES -- ============================================================================ @@ -118,6 +125,23 @@ COMMENT ON COLUMN portal_users.portal_admin IS 'Whether user has admin privilege -- TODO_CONSIDERATION: Add support for MFA/2FA -- TODO_CONSIDERATION: Consider session management table +-- Portal User Auth Table +-- Determines which Auth Provider (portal_auth_provider) and which Auth Type +-- (portal_auth_type) a user is authenticated into the Portal by +CREATE TABLE portal_user_auth ( + portal_user_auth_id SERIAL PRIMARY KEY, + portal_user_id VARCHAR(42), + portal_auth_provider portal_auth_provider, + portal_auth_type portal_auth_type, + auth_provider_user_id VARCHAR(69), + federated BOOL DEFAULT FALSE, + created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (portal_user_id) REFERENCES portal_users(portal_user_id) ON DELETE CASCADE +); + +COMMENT ON TABLE portal_user_auth IS 'Authorization provider and type for each user. Determines how to authenticate a user into the Portal.'; + -- Contacts table -- Contacts are individuals that are members of an Organization. Can be attached to Portal Users CREATE TABLE contacts ( diff --git a/portal-db/scripts/legacy-transform_down.sql b/portal-db/scripts/legacy-transform_down.sql index 674c2e079..63f1d1de0 100644 --- a/portal-db/scripts/legacy-transform_down.sql +++ b/portal-db/scripts/legacy-transform_down.sql @@ -15,10 +15,13 @@ TRUNCATE TABLE public.portal_applications RESTART IDENTITY CASCADE; -- 3. Remove portal account RBAC (depends on portal_accounts and portal_users) TRUNCATE TABLE public.portal_account_rbac RESTART IDENTITY CASCADE; --- 4. Remove RBAC roles +-- 4. Remove portal user auth (depends on portal_users) +TRUNCATE TABLE public.portal_user_auth RESTART IDENTITY CASCADE; + +-- 5. Remove RBAC roles TRUNCATE TABLE public.rbac RESTART IDENTITY CASCADE; --- 5. Remove portal users +-- 6. Remove portal users TRUNCATE TABLE public.portal_users RESTART IDENTITY CASCADE; -- 6. Remove portal accounts (depends on portal_plans) diff --git a/portal-db/scripts/legacy-transform_up.sql b/portal-db/scripts/legacy-transform_up.sql index ada12e6c1..9edd9b714 100644 --- a/portal-db/scripts/legacy-transform_up.sql +++ b/portal-db/scripts/legacy-transform_up.sql @@ -188,4 +188,30 @@ FROM legacy_extract.portal_application_whitelists paw LEFT JOIN legacy_extract.chains c ON paw.chain_id = c.id WHERE paw.type IN ('blockchains', 'origins', 'contracts'); -- Only process known types +-- Transform legacy_extract.user_auth_providers to public.portal_user_auth +INSERT INTO public.portal_user_auth ( + portal_user_id, + portal_auth_provider, + portal_auth_type, + auth_provider_user_id, + federated, + created_at, + updated_at +) +SELECT + uap.user_id as portal_user_id, + 'auth0'::portal_auth_provider as portal_auth_provider, -- Only auth0 provider supported + CASE + WHEN uap.type = 'auth0_username' THEN 'auth0_username'::portal_auth_type + WHEN uap.type = 'auth0_github' THEN 'auth0_github'::portal_auth_type + WHEN uap.type = 'auth0_google' THEN 'auth0_google'::portal_auth_type + END as portal_auth_type, + uap.provider_user_id as auth_provider_user_id, + COALESCE(uap.federated, FALSE) as federated, + uap.created_at, + uap.created_at as updated_at -- Use created_at since legacy table doesn't have updated_at +FROM legacy_extract.user_auth_providers uap +WHERE uap.provider = 'auth0' -- Only auth0 provider supported + AND uap.type IN ('auth0_username', 'auth0_github', 'auth0_google'); + COMMIT; From e0e0149cd1d996b393fea2e69dc1bc31c499e0a2 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 09:45:34 +0100 Subject: [PATCH 11/43] minor file reorganizations --- portal-db/api/README.md | 12 +++++------- portal-db/docker-compose.yml | 8 +++++--- .../init.sql => schema/002_postgrest_init.sql} | 0 portal-db/schema/003_postgrest_transactions.sql | 0 4 files changed, 10 insertions(+), 10 deletions(-) rename portal-db/{api/postgrest/init.sql => schema/002_postgrest_init.sql} (100%) create mode 100644 portal-db/schema/003_postgrest_transactions.sql diff --git a/portal-db/api/README.md b/portal-db/api/README.md index 2af3eb794..aeb3d5fa1 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -59,8 +59,8 @@ networks, _ := client.GetNetworksWithResponse(context.Background(), nil) - [๐Ÿ—๏ธ How it Works](#๏ธ-how-it-works) - [๐Ÿ“ Folder Structure](#-folder-structure) - [โš™๏ธ Configuration](#๏ธ-configuration) - - [PostgREST Configuration (`postgrest/postgrest.conf`)](#postgrest-configuration-postgrestpostgrestconf) - - [Database Roles (`postgrest/init.sql`)](#database-roles-postgrestinitsql) + - [PostgREST Configuration (`postgrest.conf`)](#postgrest-configuration-postgrestconf) + - [Database Roles (`../schema/002_postgrest_init.sql`)](#database-roles-schema002_postgrest_initsql) - [๐Ÿ” Authentication](#-authentication) - [How JWT Authentication Works](#how-jwt-authentication-works) - [Generate JWT Tokens](#generate-jwt-tokens) @@ -109,9 +109,6 @@ Database Schema โ†’ PostgREST โ†’ OpenAPI Spec โ†’ Go SDK ``` api/ -โ”œโ”€โ”€ postgrest/ # PostgREST configuration -โ”‚ โ”œโ”€โ”€ postgrest.conf # Main PostgREST config file -โ”‚ โ””โ”€โ”€ init.sql # **Database** roles and JWT setup โ”œโ”€โ”€ scripts/ # Helper scripts โ”‚ โ”œโ”€โ”€ gen-jwt.sh # Generate JWT tokens for testing โ”‚ โ””โ”€โ”€ test-auth.sh # Test authentication flow @@ -121,12 +118,13 @@ api/ โ”‚ โ””โ”€โ”€ generate-sdks.sh # SDK generation scripts โ”œโ”€โ”€ openapi/ # Generated API documentation โ”‚ โ””โ”€โ”€ openapi.json # OpenAPI 3.0 specification +โ”œโ”€โ”€ postgrest.conf # Main PostgREST config file โ””โ”€โ”€ README.md # This file ``` ## โš™๏ธ Configuration -### PostgREST Configuration (`postgrest/postgrest.conf`) +### PostgREST Configuration (`postgrest.conf`) Key settings for PostgREST: @@ -145,7 +143,7 @@ server-host = "0.0.0.0" server-port = 3000 ``` -### Database Roles (`postgrest/init.sql`) +### Database Roles (`../schema/002_postgrest_init.sql`) diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index a8a26c4f5..8504592e1 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -43,8 +43,10 @@ services: - ./tmp/portal_db_data:/var/lib/postgresql/data # Initialization scripts (run in alphabetical order on first startup) # Documentation: https://hub.docker.com/_/postgres#initialization-scripts + # 001_schema.sql: Initial PostgreSQL schema - ./schema/001_schema.sql:/docker-entrypoint-initdb.d/001_schema.sql:ro - - ./api/postgrest/init.sql:/docker-entrypoint-initdb.d/999_postgrest_init.sql:ro + # 002_postgrest_init.sql: PostgREST API setup + - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro healthcheck: # Health check to ensure database is ready before starting PostgREST test: ["CMD", "pg_isready", "-U", "postgres", "-d", "portal_db"] @@ -65,9 +67,9 @@ services: # PostgREST API and documentation server - "3000:3000" volumes: - # Mount PostgREST configuration file (see api/postgrest/postgrest.conf) + # Mount PostgREST configuration file (see api/postgrest.conf) # Configuration docs: https://docs.postgrest.org/en/v13/references/configuration.html - - ./api/postgrest/postgrest.conf:/etc/postgrest/postgrest.conf:ro + - ./api/postgrest.conf:/etc/postgrest/postgrest.conf:ro command: ["postgrest", "/etc/postgrest/postgrest.conf"] depends_on: postgres: diff --git a/portal-db/api/postgrest/init.sql b/portal-db/schema/002_postgrest_init.sql similarity index 100% rename from portal-db/api/postgrest/init.sql rename to portal-db/schema/002_postgrest_init.sql diff --git a/portal-db/schema/003_postgrest_transactions.sql b/portal-db/schema/003_postgrest_transactions.sql new file mode 100644 index 000000000..e69de29bb From bd53fbe412bfe8d68f6f90bdf45db65d0379715b Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 10:35:45 +0100 Subject: [PATCH 12/43] add transaction example --- portal-db/Makefile | 11 +- portal-db/api/README.md | 31 + portal-db/api/openapi/openapi.json | 410 +- portal-db/api/{postgrest => }/postgrest.conf | 0 .../api/scripts/test-portal-app-creation.sh | 180 + portal-db/docker-compose.yml | 2 + .../schema/003_postgrest_transactions.sql | 281 + portal-db/scripts/hydrate-testdata.sh | 51 +- portal-db/sdk/go/client.go | 12472 ---------------- portal-db/sdk/go/models.go | 1947 --- 10 files changed, 950 insertions(+), 14435 deletions(-) rename portal-db/api/{postgrest => }/postgrest.conf (100%) create mode 100755 portal-db/api/scripts/test-portal-app-creation.sh delete mode 100644 portal-db/sdk/go/client.go delete mode 100644 portal-db/sdk/go/models.go diff --git a/portal-db/Makefile b/portal-db/Makefile index de8c6b5f9..55eca4792 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -2,7 +2,7 @@ # Provides convenient commands for managing the PostgREST API .PHONY: postgrest-up postgrest-down postgrest-logs -.PHONY: generate-openapi generate-sdks generate-all test-auth +.PHONY: generate-openapi generate-sdks generate-all test-auth test-portal-app .PHONY: hydrate-testdata hydrate-services hydrate-applications hydrate-gateways # ============================================================================ @@ -66,6 +66,15 @@ test-auth: ## Test JWT authentication flow fi cd api/scripts && ./test-auth.sh +test-portal-app: ## Test portal application creation and retrieval + @echo "๐Ÿงช Testing portal application creation..." + @if ! docker ps | grep -q portal-db-api; then \ + echo "โŒ PostgREST API is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + cd api/scripts && ./test-portal-app-creation.sh + gen-jwt: ## Generate JWT token @echo "๐Ÿ”‘ Generating JWT token..." @if ! docker ps | grep -q portal-db-api; then \ diff --git a/portal-db/api/README.md b/portal-db/api/README.md index aeb3d5fa1..aa0563eb2 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -67,6 +67,7 @@ networks, _ := client.GetNetworksWithResponse(context.Background(), nil) - [Use JWT Tokens](#use-jwt-tokens) - [Permission Levels](#permission-levels) - [Test Authentication](#test-authentication) + - [๐Ÿ’พ Database Transactions](#-database-transactions) - [๐Ÿ› ๏ธ Go SDK Generation](#๏ธ-go-sdk-generation) - [Generate SDK](#generate-sdk) - [Generated Files](#generated-files) @@ -232,6 +233,36 @@ This tests: - Authenticated access to protected data - JWT claims access via `/rpc/me` +## ๐Ÿ’พ Database Transactions + +For complex multi-step operations, create PostgreSQL functions that PostgREST automatically exposes as RPC endpoints: + +```sql +-- Example: ../schema/003_postgrest_transactions.sql +CREATE OR REPLACE FUNCTION public.create_portal_application( + p_portal_account_id VARCHAR(36), + p_portal_user_id VARCHAR(36), + p_portal_application_name VARCHAR(42) DEFAULT NULL +) RETURNS JSON AS $$ +BEGIN + -- Multi-step transaction logic here + -- All operations are atomic within the function +END; +$$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; +``` + +**Usage:** +```bash +curl -X POST http://localhost:3000/rpc/create_portal_application \ + -H "Authorization: Bearer $TOKEN" \ + -d '{"p_portal_account_id": "...", "p_portal_user_id": "..."}' +``` + +**Test transactions:** +```bash +make test-portal-app +``` + ## ๐Ÿ› ๏ธ Go SDK Generation ### Generate SDK diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index d649ca8ab..ce5d374ef 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -869,6 +869,12 @@ { "$ref": "#/components/parameters/rowFilter.services.active" }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, { "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" }, @@ -1001,6 +1007,12 @@ { "$ref": "#/components/parameters/rowFilter.services.active" }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, { "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" }, @@ -1056,6 +1068,12 @@ { "$ref": "#/components/parameters/rowFilter.services.active" }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, { "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" }, @@ -2090,6 +2108,354 @@ "(rpc) me" ] } + }, + "/rpc/create_portal_application": { + "get": { + "description": "Validates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "parameters": [ + { + "in": "query", + "name": "p_portal_account_id", + "required": true, + "schema": { + "type": "string", + "format": "character varying" + } + }, + { + "in": "query", + "name": "p_portal_user_id", + "required": true, + "schema": { + "type": "string", + "format": "character varying" + } + }, + { + "in": "query", + "name": "p_portal_application_name", + "required": false, + "schema": { + "type": "string", + "format": "character varying" + } + }, + { + "in": "query", + "name": "p_emoji", + "required": false, + "schema": { + "type": "string", + "format": "character varying" + } + }, + { + "in": "query", + "name": "p_portal_application_user_limit", + "required": false, + "schema": { + "type": "integer", + "format": "integer" + } + }, + { + "in": "query", + "name": "p_portal_application_user_limit_interval", + "required": false, + "schema": { + "type": "string", + "format": "plan_interval" + } + }, + { + "in": "query", + "name": "p_portal_application_user_limit_rps", + "required": false, + "schema": { + "type": "integer", + "format": "integer" + } + }, + { + "in": "query", + "name": "p_portal_application_description", + "required": false, + "schema": { + "type": "string", + "format": "character varying" + } + }, + { + "in": "query", + "name": "p_favorite_service_ids", + "required": false, + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + { + "in": "query", + "name": "p_secret_key_required", + "required": false, + "schema": { + "type": "boolean", + "format": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Creates a portal application with all associated RBAC entries in a single atomic transaction. ", + "tags": [ + "(rpc) create_portal_application" + ] + }, + "post": { + "description": "Validates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Creates a portal application with all associated RBAC entries in a single atomic transaction. \nValidates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "properties": { + "p_emoji": { + "format": "character varying", + "type": "string" + }, + "p_favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "p_portal_account_id": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_description": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_name": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "p_portal_application_user_limit_interval": { + "format": "plan_interval", + "type": "string" + }, + "p_portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "p_portal_user_id": { + "format": "character varying", + "type": "string" + }, + "p_secret_key_required": { + + "type": "boolean" + } + }, + "required": [ + "p_portal_account_id", + "p_portal_user_id" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "description": "Creates a portal application with all associated RBAC entries in a single atomic transaction. \nValidates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "properties": { + "p_emoji": { + "format": "character varying", + "type": "string" + }, + "p_favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "p_portal_account_id": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_description": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_name": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "p_portal_application_user_limit_interval": { + "format": "plan_interval", + "type": "string" + }, + "p_portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "p_portal_user_id": { + "format": "character varying", + "type": "string" + }, + "p_secret_key_required": { + + "type": "boolean" + } + }, + "required": [ + "p_portal_account_id", + "p_portal_user_id" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "description": "Creates a portal application with all associated RBAC entries in a single atomic transaction. \nValidates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "properties": { + "p_emoji": { + "format": "character varying", + "type": "string" + }, + "p_favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "p_portal_account_id": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_description": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_name": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "p_portal_application_user_limit_interval": { + "format": "plan_interval", + "type": "string" + }, + "p_portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "p_portal_user_id": { + "format": "character varying", + "type": "string" + }, + "p_secret_key_required": { + + "type": "boolean" + } + }, + "required": [ + "p_portal_account_id", + "p_portal_user_id" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "description": "Creates a portal application with all associated RBAC entries in a single atomic transaction. \nValidates user membership in the account before creation. \nReturns the application details including the generated secret key.\nThis function is exposed via PostgREST as POST /rpc/create_portal_application", + "properties": { + "p_emoji": { + "format": "character varying", + "type": "string" + }, + "p_favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "p_portal_account_id": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_description": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_name": { + "format": "character varying", + "type": "string" + }, + "p_portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "p_portal_application_user_limit_interval": { + "format": "plan_interval", + "type": "string" + }, + "p_portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "p_portal_user_id": { + "format": "character varying", + "type": "string" + }, + "p_secret_key_required": { + + "type": "boolean" + } + }, + "required": [ + "p_portal_account_id", + "p_portal_user_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Creates a portal application with all associated RBAC entries in a single atomic transaction. ", + "tags": [ + "(rpc) create_portal_application" + ] + } } }, "externalDocs": { @@ -2410,7 +2776,7 @@ "in": "query", "schema": { "type": "string", - "format": "uuid" + "format": "character varying" } }, "rowFilter.portal_applications.portal_account_id": { @@ -2419,7 +2785,7 @@ "in": "query", "schema": { "type": "string", - "format": "uuid" + "format": "character varying" } }, "rowFilter.portal_applications.portal_application_name": { @@ -2596,6 +2962,24 @@ "format": "boolean" } }, + "rowFilter.services.beta": { + "name": "beta", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.coming_soon": { + "name": "coming_soon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, "rowFilter.services.quality_fallback_enabled": { "name": "quality_fallback_enabled", "required": false, @@ -2657,7 +3041,7 @@ "in": "query", "schema": { "type": "string", - "format": "uuid" + "format": "character varying" } }, "rowFilter.portal_accounts.organization_id": { @@ -3357,12 +3741,14 @@ "portal_application_id": { "default": "gen_random_uuid()", "description": "Note:\nThis is a Primary Key.", - "format": "uuid", + "format": "character varying", + "maxLength": 36, "type": "string" }, "portal_account_id": { "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", - "format": "uuid", + "format": "character varying", + "maxLength": 36, "type": "string" }, "portal_application_name": { @@ -3465,7 +3851,6 @@ "type": "array" }, "service_owner_address": { - "description": "Note:\nThis is a Foreign Key to `gateways.gateway_address`.", "format": "character varying", "maxLength": 50, "type": "string" @@ -3481,6 +3866,16 @@ "type": "boolean" }, + "beta": { + "default": false, + + "type": "boolean" + }, + "coming_soon": { + "default": false, + + "type": "boolean" + }, "quality_fallback_enabled": { "default": false, @@ -3522,7 +3917,8 @@ "portal_account_id": { "default": "gen_random_uuid()", "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", - "format": "uuid", + "format": "character varying", + "maxLength": 36, "type": "string" }, "organization_id": { diff --git a/portal-db/api/postgrest/postgrest.conf b/portal-db/api/postgrest.conf similarity index 100% rename from portal-db/api/postgrest/postgrest.conf rename to portal-db/api/postgrest.conf diff --git a/portal-db/api/scripts/test-portal-app-creation.sh b/portal-db/api/scripts/test-portal-app-creation.sh new file mode 100755 index 000000000..8b0b902c3 --- /dev/null +++ b/portal-db/api/scripts/test-portal-app-creation.sh @@ -0,0 +1,180 @@ +#!/bin/bash + +# ๐Ÿงช Test Script for Portal Application Creation +# This script tests the create_portal_application function and retrieval + +set -e + +# ๐ŸŽจ Color codes for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +PURPLE='\033[0;35m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# ๐Ÿ“ Function to print colored output +print_status() { + local color=$1 + local message=$2 + echo -e "${color}${message}${NC}" +} + +# ๐Ÿ” Function to validate PostgREST is running +validate_postgrest() { + print_status $BLUE "๐Ÿ” Checking if PostgREST is running..." + if ! curl -s http://localhost:3000/ > /dev/null 2>&1; then + print_status $RED "โŒ Error: PostgREST is not running on localhost:3000" + print_status $YELLOW "๐Ÿ’ก Start the services first: make postgrest-up" + exit 1 + fi + print_status $GREEN "โœ… PostgREST is running" +} + +# ๐Ÿ”‘ Function to generate JWT token +generate_jwt() { + print_status $BLUE "๐Ÿ”‘ Generating JWT token..." + JWT_TOKEN=$(./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) + if [ -z "$JWT_TOKEN" ]; then + print_status $RED "โŒ Error: Failed to generate JWT token" + exit 1 + fi + print_status $GREEN "โœ… JWT token generated" +} + +# ๐Ÿ“ฑ Function to create portal application +create_portal_app() { + print_status $BLUE "๐Ÿ“ฑ Creating new portal application..." + + # Generate a unique app name with timestamp + TIMESTAMP=$(date +%s) + APP_NAME="Test App ${TIMESTAMP}" + + CREATE_RESPONSE=$(curl -s -X POST http://localhost:3000/rpc/create_portal_application \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $JWT_TOKEN" \ + -d "{ + \"p_portal_account_id\": \"10000000-0000-0000-0000-000000000001\", + \"p_portal_user_id\": \"00000000-0000-0000-0000-000000000002\", + \"p_portal_application_name\": \"$APP_NAME\", + \"p_portal_application_description\": \"Test application created via automated test\", + \"p_emoji\": \"๐Ÿงช\" + }") + + # Check if the response contains an error + if echo "$CREATE_RESPONSE" | grep -q "\"code\""; then + print_status $RED "โŒ Error creating portal application:" + echo "$CREATE_RESPONSE" | jq '.' + exit 1 + fi + + # Extract the application ID from the response + APP_ID=$(echo "$CREATE_RESPONSE" | jq -r '.portal_application_id') + SECRET_KEY=$(echo "$CREATE_RESPONSE" | jq -r '.secret_key') + + if [ "$APP_ID" = "null" ] || [ -z "$APP_ID" ]; then + print_status $RED "โŒ Error: Could not extract application ID from response" + echo "$CREATE_RESPONSE" + exit 1 + fi + + print_status $GREEN "โœ… Portal application created successfully!" + print_status $CYAN " ๐Ÿ“ฑ Application ID: $APP_ID" + print_status $CYAN " ๐Ÿท๏ธ Application Name: $APP_NAME" + print_status $CYAN " ๐Ÿ”‘ Secret Key: $SECRET_KEY" + + echo "" + print_status $PURPLE "๐Ÿ“‹ Full Create Response:" + echo "$CREATE_RESPONSE" | jq '.' +} + +# ๐Ÿ” Function to retrieve portal application +retrieve_portal_app() { + print_status $BLUE "๐Ÿ” Retrieving portal application by ID..." + + RETRIEVE_RESPONSE=$(curl -s -X GET \ + "http://localhost:3000/portal_applications?portal_application_id=eq.$APP_ID" \ + -H "Authorization: Bearer $JWT_TOKEN") + + # Check if we got results + APP_COUNT=$(echo "$RETRIEVE_RESPONSE" | jq '. | length') + if [ "$APP_COUNT" -eq "0" ]; then + print_status $RED "โŒ Error: Application not found in database" + exit 1 + fi + + print_status $GREEN "โœ… Portal application retrieved successfully!" + + echo "" + print_status $PURPLE "๐Ÿ“‹ Full Retrieve Response:" + echo "$RETRIEVE_RESPONSE" | jq '.' + + # Extract key fields for comparison + RETRIEVED_NAME=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_name') + RETRIEVED_DESCRIPTION=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_description') + RETRIEVED_EMOJI=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].emoji') + + print_status $CYAN " ๐Ÿท๏ธ Retrieved Name: $RETRIEVED_NAME" + print_status $CYAN " ๐Ÿ“ Retrieved Description: $RETRIEVED_DESCRIPTION" + print_status $CYAN " ๐Ÿ˜Š Retrieved Emoji: $RETRIEVED_EMOJI" +} + +# ๐Ÿ” Function to test retrieval by name +retrieve_by_name() { + print_status $BLUE "๐Ÿ” Testing retrieval by application name..." + + # URL encode the app name + ENCODED_NAME=$(echo "$APP_NAME" | sed 's/ /%20/g') + + RETRIEVE_BY_NAME_RESPONSE=$(curl -s -X GET \ + "http://localhost:3000/portal_applications?portal_application_name=eq.$ENCODED_NAME" \ + -H "Authorization: Bearer $JWT_TOKEN") + + APP_COUNT_BY_NAME=$(echo "$RETRIEVE_BY_NAME_RESPONSE" | jq '. | length') + if [ "$APP_COUNT_BY_NAME" -eq "0" ]; then + print_status $RED "โŒ Error: Application not found by name" + exit 1 + fi + + print_status $GREEN "โœ… Portal application found by name!" + print_status $CYAN " Found $APP_COUNT_BY_NAME application(s) with name: $APP_NAME" +} + +# ๐Ÿ“Š Function to show test summary +show_summary() { + echo "" + print_status $PURPLE "======================================" + print_status $PURPLE "๐ŸŽ‰ TEST SUMMARY" + print_status $PURPLE "======================================" + print_status $GREEN "โœ… PostgREST API connectivity" + print_status $GREEN "โœ… JWT token generation" + print_status $GREEN "โœ… Portal application creation" + print_status $GREEN "โœ… Portal application retrieval by ID" + print_status $GREEN "โœ… Portal application retrieval by name" + print_status $PURPLE "======================================" + print_status $CYAN "๐Ÿ’ก Created application ID: $APP_ID" + print_status $CYAN "๐Ÿ’ก Application name: $APP_NAME" + print_status $CYAN "๐Ÿ’ก Secret key: $SECRET_KEY" + print_status $PURPLE "======================================" +} + +# ๐ŸŽฏ Main execution +main() { + print_status $PURPLE "๐Ÿงช Portal Application Creation Test" + print_status $PURPLE "====================================" + echo "" + + # Run all test steps + validate_postgrest + generate_jwt + create_portal_app + retrieve_portal_app + retrieve_by_name + show_summary + + print_status $GREEN "๐ŸŽ‰ All tests passed successfully!" +} + +# ๐Ÿ Execute main function +main "$@" diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 8504592e1..9b1a63c12 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -47,6 +47,8 @@ services: - ./schema/001_schema.sql:/docker-entrypoint-initdb.d/001_schema.sql:ro # 002_postgrest_init.sql: PostgREST API setup - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro + # 003_postgrest_transactions.sql: Custom transaction functions + - ./schema/003_postgrest_transactions.sql:/docker-entrypoint-initdb.d/003_postgrest_transactions.sql:ro healthcheck: # Health check to ensure database is ready before starting PostgREST test: ["CMD", "pg_isready", "-U", "postgres", "-d", "portal_db"] diff --git a/portal-db/schema/003_postgrest_transactions.sql b/portal-db/schema/003_postgrest_transactions.sql index e69de29bb..fb14de2a5 100644 --- a/portal-db/schema/003_postgrest_transactions.sql +++ b/portal-db/schema/003_postgrest_transactions.sql @@ -0,0 +1,281 @@ +-- This file contains transactions functions for performing complex database operations +-- such as creating a new portal application and its associated data + +-- ============================================================================ +-- SECRET KEY GENERATION FUNCTION +-- ============================================================================ +-- +-- Generates cryptographically secure secret keys for portal applications. +-- This function is separated for reusability and to centralize key generation logic. +-- +-- References: +-- - PostgreSQL UUID Generation: https://www.postgresql.org/docs/current/functions-uuid.html +-- - PostgREST Security Definer: https://docs.postgrest.org/en/v13/explanations/db_authz.html#security-definer +-- +-- Security Considerations: +-- - Uses gen_random_uuid() which provides 122 bits of entropy +-- - Returns both plain text key (for immediate use) and "hash" (for storage) +-- - TODO_IMPROVE: Implement proper cryptographic hashing (PBKDF2, Argon2, bcrypt) +-- - TODO_IMPROVE: Consider using PostgreSQL's pgcrypto extension +-- +CREATE OR REPLACE FUNCTION public.generate_portal_app_secret() +RETURNS JSON AS $$ +DECLARE + v_secret_key TEXT; + v_secret_key_hash VARCHAR(255); +BEGIN + -- Generate a cryptographically secure secret key + -- Using gen_random_uuid() provides 122 bits of entropy which is suitable for API keys + -- Format: Remove hyphens to create a 32-character hex string + v_secret_key := replace(gen_random_uuid()::text, '-', ''); + + -- For now, we're storing the "hash" as the plain key since the schema comment + -- indicates this needs improvement. In production, this should be properly hashed. + -- TODO_IMPROVE: Use a proper key derivation function like PBKDF2 or Argon2 + -- TODO_IMPROVE: Consider using PostgreSQL's pgcrypto extension for better hashing + v_secret_key_hash := v_secret_key; + + -- Return both the plain key (for immediate use) and hash (for storage) + RETURN json_build_object( + 'secret_key', v_secret_key, + 'secret_key_hash', v_secret_key_hash, + 'generated_at', CURRENT_TIMESTAMP, + 'entropy_bits', 122, + 'algorithm', 'UUID v4 (hex formatted)' + ); +END; +$$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +-- Remove public execute permission to prevent PostgREST from exposing this as an API endpoint +-- This function is for internal use by other database functions only +REVOKE EXECUTE ON FUNCTION public.generate_portal_app_secret FROM PUBLIC; + +-- Do NOT grant to authenticated role - this keeps it private +-- Only functions with SECURITY DEFINER can call this function + +COMMENT ON FUNCTION public.generate_portal_app_secret IS +'INTERNAL USE ONLY: Generates cryptographically secure secret keys for portal applications. +Returns both plain text key and storage hash. +Used internally by create_portal_application function. +NOT exposed via PostgREST API.'; + +-- ============================================================================ +-- CREATE PORTAL APPLICATION FUNCTION +-- ============================================================================ +-- +-- This function creates a portal application with all associated data in a single +-- atomic transaction. This approach follows PostgREST best practices for complex +-- multi-table operations that require ACID guarantees. +-- +-- References: +-- - PostgREST Transactions: https://docs.postgrest.org/en/v13/references/transactions.html +-- - PostgreSQL UUID Generation: https://www.postgresql.org/docs/current/functions-uuid.html +-- - PostgreSQL Security Functions: https://www.postgresql.org/docs/current/functions-info.html +-- +-- Security Considerations: +-- - Uses SECURITY DEFINER to execute with function owner privileges +-- - Validates that user belongs to the account before granting access +-- - Generates cryptographically secure API keys using gen_random_uuid() +-- - TODO_IMPROVE: Should hash secret keys using proper cryptographic functions +-- +CREATE OR REPLACE FUNCTION public.create_portal_application( + p_portal_account_id VARCHAR(36), + p_portal_user_id VARCHAR(36), + p_portal_application_name VARCHAR(42) DEFAULT NULL, + p_emoji VARCHAR(16) DEFAULT NULL, + p_portal_application_user_limit INT DEFAULT NULL, + p_portal_application_user_limit_interval plan_interval DEFAULT NULL, + p_portal_application_user_limit_rps INT DEFAULT NULL, + p_portal_application_description VARCHAR(255) DEFAULT NULL, + p_favorite_service_ids VARCHAR[] DEFAULT NULL, + p_secret_key_required BOOLEAN DEFAULT false +) RETURNS JSON AS $$ +DECLARE + v_new_app_id VARCHAR(36); + v_secret_data JSON; + v_secret_key TEXT; + v_secret_key_hash VARCHAR(255); + v_user_is_account_member BOOLEAN := FALSE; + v_result JSON; +BEGIN + -- ======================================================================== + -- VALIDATION PHASE + -- ======================================================================== + + -- Validate required parameters + -- PostgreSQL will enforce NOT NULL constraints, but we provide better error messages + IF p_portal_account_id IS NULL THEN + RAISE EXCEPTION 'portal_account_id is required' + USING ERRCODE = '23502', -- not_null_violation + HINT = 'Provide a valid portal account ID'; + END IF; + + IF p_portal_user_id IS NULL THEN + RAISE EXCEPTION 'portal_user_id is required' + USING ERRCODE = '23502', + HINT = 'Provide a valid portal user ID'; + END IF; + + -- Verify the account exists + -- This will throw a foreign key constraint error if account doesn't exist + IF NOT EXISTS (SELECT 1 FROM portal_accounts WHERE portal_account_id = p_portal_account_id) THEN + RAISE EXCEPTION 'Portal account not found: %', p_portal_account_id + USING ERRCODE = '23503', -- foreign_key_violation + HINT = 'Ensure the portal account exists before creating applications'; + END IF; + + -- Verify the user exists and has access to this account + -- This implements the business rule that users must be account members + -- before they can create applications within that account + SELECT EXISTS ( + SELECT 1 FROM portal_account_rbac + WHERE portal_account_id = p_portal_account_id + AND portal_user_id = p_portal_user_id + AND user_joined_account = TRUE + ) INTO v_user_is_account_member; + + IF NOT v_user_is_account_member THEN + RAISE EXCEPTION 'User % is not a member of account %', p_portal_user_id, p_portal_account_id + USING ERRCODE = '42501', -- insufficient_privilege + HINT = 'User must be a member of the account to create applications'; + END IF; + + -- ======================================================================== + -- SECRET KEY GENERATION + -- ======================================================================== + + -- Use the dedicated secret generation function + -- This centralizes key generation logic and makes it reusable + SELECT public.generate_portal_app_secret() INTO v_secret_data; + + -- Extract the generated key and hash from the JSON response + v_secret_key := v_secret_data->>'secret_key'; + v_secret_key_hash := v_secret_data->>'secret_key_hash'; + + -- ======================================================================== + -- APPLICATION CREATION PHASE + -- ======================================================================== + + -- Generate unique application ID + -- gen_random_uuid() provides a UUID v4 with extremely low collision probability + -- The PRIMARY KEY constraint ensures database-level uniqueness + v_new_app_id := gen_random_uuid()::text; + + -- Insert the portal application + -- All optional fields use their database defaults if not provided + -- The function parameters allow overriding defaults when needed + INSERT INTO portal_applications ( + portal_application_id, + portal_account_id, + portal_application_name, + emoji, + portal_application_user_limit, + portal_application_user_limit_interval, + portal_application_user_limit_rps, + portal_application_description, + favorite_service_ids, + secret_key_hash, + secret_key_required, + created_at, + updated_at + ) VALUES ( + v_new_app_id, + p_portal_account_id, + p_portal_application_name, + p_emoji, + p_portal_application_user_limit, + p_portal_application_user_limit_interval, + p_portal_application_user_limit_rps, + p_portal_application_description, + p_favorite_service_ids, + v_secret_key_hash, + p_secret_key_required, + CURRENT_TIMESTAMP, + CURRENT_TIMESTAMP + ); + + -- ======================================================================== + -- RBAC SETUP PHASE + -- ======================================================================== + + -- Grant the creating user access to the new application + -- This follows the principle that application creators should have access to their apps + -- The unique constraint prevents duplicate entries + INSERT INTO portal_application_rbac ( + portal_application_id, + portal_user_id, + created_at, + updated_at + ) VALUES ( + v_new_app_id, + p_portal_user_id, + CURRENT_TIMESTAMP, + CURRENT_TIMESTAMP + ); + + -- ======================================================================== + -- RESPONSE GENERATION + -- ======================================================================== + + -- Build JSON response with all relevant information + -- Include the secret key in the response since this is the only time it can be viewed + -- TODO_IMPROVE: When proper hashing is implemented, return the secret key only once + SELECT json_build_object( + 'portal_application_id', v_new_app_id, + 'portal_account_id', p_portal_account_id, + 'portal_application_name', p_portal_application_name, + 'secret_key', v_secret_key, + 'secret_key_required', p_secret_key_required, + 'created_at', CURRENT_TIMESTAMP, + 'message', 'Portal application created successfully', + 'warning', 'Store the secret key securely - it cannot be retrieved again' + ) INTO v_result; + + RETURN v_result; + +EXCEPTION + WHEN unique_violation THEN + -- Handle the rare case of UUID collision or constraint violations + RAISE EXCEPTION 'Application creation failed due to constraint violation: %', SQLERRM + USING ERRCODE = '23505', + HINT = 'This may be due to a duplicate name or UUID collision. Try again.'; + + WHEN foreign_key_violation THEN + -- Handle cases where referenced records don't exist + RAISE EXCEPTION 'Application creation failed due to invalid reference: %', SQLERRM + USING ERRCODE = '23503', + HINT = 'Ensure all referenced accounts and users exist.'; + + WHEN check_violation THEN + -- Handle constraint check failures (e.g., negative limits) + RAISE EXCEPTION 'Application creation failed due to invalid data: %', SQLERRM + USING ERRCODE = '23514', + HINT = 'Check that all numeric values are within valid ranges.'; + + WHEN OTHERS THEN + -- Handle any other errors with context + RAISE EXCEPTION 'Unexpected error during application creation: %', SQLERRM + USING ERRCODE = SQLSTATE, + HINT = 'Contact support if this error persists.'; +END; +$$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +-- Set function ownership and permissions +-- SECURITY DEFINER allows the function to run with elevated privileges +-- This is necessary to ensure the function can access all required tables +-- See: https://www.postgresql.org/docs/current/sql-createfunction.html#SQL-CREATEFUNCTION-SECURITY + +-- Grant execute permission to authenticated users +-- This assumes your PostgREST setup uses an 'authenticated' role for logged-in users +-- Adjust the role name based on your authentication setup +GRANT EXECUTE ON FUNCTION public.create_portal_application TO authenticated; + +-- Note: The function should be publicly executable for PostgREST to expose it +-- PostgREST requires functions to have appropriate permissions to be exposed as RPC endpoints + +-- Add function comment for documentation +COMMENT ON FUNCTION public.create_portal_application IS +'Creates a portal application with all associated RBAC entries in a single atomic transaction. +Validates user membership in the account before creation. +Returns the application details including the generated secret key. +This function is exposed via PostgREST as POST /rpc/create_portal_application'; diff --git a/portal-db/scripts/hydrate-testdata.sh b/portal-db/scripts/hydrate-testdata.sh index 25a97c896..ea5b5a682 100755 --- a/portal-db/scripts/hydrate-testdata.sh +++ b/portal-db/scripts/hydrate-testdata.sh @@ -109,16 +109,23 @@ WHERE NOT EXISTS ( ); -- Insert test portal users (has UNIQUE constraint, so ON CONFLICT works) -INSERT INTO portal_users (portal_user_email, signed_up, portal_admin) VALUES - ('admin@grove.city', true, true), - ('alice@acme.com', true, false), - ('bob@techinnovators.com', true, false), - ('charlie@blockchain.com', false, false) +-- Using deterministic UUIDs for reliable testing +INSERT INTO portal_users (portal_user_id, portal_user_email, signed_up, portal_admin) VALUES + ('00000000-0000-0000-0000-000000000001', 'admin@grove.city', true, true), + ('00000000-0000-0000-0000-000000000002', 'alice@acme.com', true, false), + ('00000000-0000-0000-0000-000000000003', 'bob@techinnovators.com', true, false), + ('00000000-0000-0000-0000-000000000004', 'charlie@blockchain.com', false, false) ON CONFLICT (portal_user_email) DO NOTHING; --- Insert test portal accounts -INSERT INTO portal_accounts (organization_id, portal_plan_type, user_account_name, internal_account_name, billing_type) +-- Insert test portal accounts with deterministic UUIDs +INSERT INTO portal_accounts (portal_account_id, organization_id, portal_plan_type, user_account_name, internal_account_name, billing_type) SELECT + CASE + WHEN org.organization_name = 'Acme Corporation' THEN '10000000-0000-0000-0000-000000000001' + WHEN org.organization_name = 'Tech Innovators LLC' THEN '10000000-0000-0000-0000-000000000002' + WHEN org.organization_name = 'Blockchain Solutions Inc' THEN '10000000-0000-0000-0000-000000000003' + ELSE '10000000-0000-0000-0000-000000000004' + END, org.organization_id, CASE WHEN org.organization_name = 'Acme Corporation' THEN 'ENTERPRISE' @@ -145,8 +152,30 @@ WHERE NOT EXISTS ( WHERE pa.organization_id = org.organization_id ); --- Insert test portal applications +-- Insert test portal account RBAC (link users to accounts) +INSERT INTO portal_account_rbac (portal_account_id, portal_user_id, role_name, user_joined_account) +SELECT + pa.portal_account_id, + pu.portal_user_id, + 'OWNER', + true +FROM portal_accounts pa +CROSS JOIN portal_users pu +WHERE ( + (pa.user_account_name = 'acme-corp' AND pu.portal_user_email = 'alice@acme.com') OR + (pa.user_account_name = 'tech-innovators' AND pu.portal_user_email = 'bob@techinnovators.com') OR + (pa.user_account_name = 'blockchain-solutions' AND pu.portal_user_email = 'charlie@blockchain.com') OR + (pa.user_account_name = 'web3-builders' AND pu.portal_user_email = 'admin@grove.city') +) +AND NOT EXISTS ( + SELECT 1 FROM portal_account_rbac rbac + WHERE rbac.portal_account_id = pa.portal_account_id + AND rbac.portal_user_id = pu.portal_user_id +); + +-- Insert test portal applications with deterministic UUIDs INSERT INTO portal_applications ( + portal_application_id, portal_account_id, portal_application_name, emoji, @@ -155,6 +184,12 @@ INSERT INTO portal_applications ( secret_key_required ) SELECT + CASE + WHEN pa.user_account_name = 'acme-corp' THEN '20000000-0000-0000-0000-000000000001' + WHEN pa.user_account_name = 'tech-innovators' THEN '20000000-0000-0000-0000-000000000002' + WHEN pa.user_account_name = 'blockchain-solutions' THEN '20000000-0000-0000-0000-000000000003' + ELSE '20000000-0000-0000-0000-000000000004' + END, pa.portal_account_id, CASE WHEN pa.user_account_name = 'acme-corp' THEN 'DeFi Dashboard' diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go deleted file mode 100644 index b2430414a..000000000 --- a/portal-db/sdk/go/client.go +++ /dev/null @@ -1,12472 +0,0 @@ -// Package portaldb provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. -package portaldb - -import ( - "bytes" - "compress/gzip" - "context" - "encoding/base64" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "path" - "strings" - - "github.com/getkin/kin-openapi/openapi3" - "github.com/oapi-codegen/runtime" -) - -// RequestEditorFn is the function signature for the RequestEditor callback function -type RequestEditorFn func(ctx context.Context, req *http.Request) error - -// Doer performs HTTP requests. -// -// The standard http.Client implements this interface. -type HttpRequestDoer interface { - Do(req *http.Request) (*http.Response, error) -} - -// Client which conforms to the OpenAPI3 specification for this service. -type Client struct { - // The endpoint of the server conforming to this interface, with scheme, - // https://api.deepmap.com for example. This can contain a path relative - // to the server, such as https://api.deepmap.com/dev-test, and all the - // paths in the swagger spec will be appended to the server. - Server string - - // Doer for performing requests, typically a *http.Client with any - // customized settings, such as certificate chains. - Client HttpRequestDoer - - // A list of callbacks for modifying requests which are generated before sending over - // the network. - RequestEditors []RequestEditorFn -} - -// ClientOption allows setting custom parameters during construction -type ClientOption func(*Client) error - -// Creates a new Client, with reasonable defaults -func NewClient(server string, opts ...ClientOption) (*Client, error) { - // create a client with sane default values - client := Client{ - Server: server, - } - // mutate client and add all optional params - for _, o := range opts { - if err := o(&client); err != nil { - return nil, err - } - } - // ensure the server URL always has a trailing slash - if !strings.HasSuffix(client.Server, "/") { - client.Server += "/" - } - // create httpClient, if not already present - if client.Client == nil { - client.Client = &http.Client{} - } - return &client, nil -} - -// WithHTTPClient allows overriding the default Doer, which is -// automatically created using http.Client. This is useful for tests. -func WithHTTPClient(doer HttpRequestDoer) ClientOption { - return func(c *Client) error { - c.Client = doer - return nil - } -} - -// WithRequestEditorFn allows setting up a callback function, which will be -// called right before sending the request. This can be used to mutate the request. -func WithRequestEditorFn(fn RequestEditorFn) ClientOption { - return func(c *Client) error { - c.RequestEditors = append(c.RequestEditors, fn) - return nil - } -} - -// The interface specification for the client above. -type ClientInterface interface { - // Get request - Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteApplications request - DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApplications request - GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchApplicationsWithBody request with any body - PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApplicationsWithBody request with any body - PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteGateways request - DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetGateways request - GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchGatewaysWithBody request with any body - PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostGatewaysWithBody request with any body - PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteNetworks request - DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetNetworks request - GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchNetworksWithBody request with any body - PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostNetworksWithBody request with any body - PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteOrganizations request - DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizations request - GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchOrganizationsWithBody request with any body - PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationsWithBody request with any body - PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalAccounts request - DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalAccounts request - GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalAccountsWithBody request with any body - PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalAccountsWithBody request with any body - PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalApplications request - DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalApplications request - GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalApplicationsWithBody request with any body - PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalApplicationsWithBody request with any body - PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalPlans request - DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalPlans request - GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalPlansWithBody request with any body - PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalPlansWithBody request with any body - PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetRpcMe request - GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostRpcMeWithBody request with any body - PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceEndpoints request - DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceEndpoints request - GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceEndpointsWithBody request with any body - PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceEndpointsWithBody request with any body - PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceFallbacks request - DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceFallbacks request - GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceFallbacksWithBody request with any body - PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceFallbacksWithBody request with any body - PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServices request - DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServices request - GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServicesWithBody request with any body - PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServicesWithBody request with any body - PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) -} - -func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteGatewaysRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGatewaysRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteNetworksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetNetworksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteOrganizationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalAccountsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalAccountsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalPlansRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalPlansRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcMeRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewGetRequest generates requests for Get -func NewGetRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteApplicationsRequest generates requests for DeleteApplications -func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetApplicationsRequest generates requests for GetApplications -func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchApplicationsRequest calls the generic PatchApplications builder with application/json body -func NewPatchApplicationsRequest(server string, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchApplicationsRequestWithBody generates requests for PatchApplications with any type of body -func NewPatchApplicationsRequestWithBody(server string, params *PatchApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostApplicationsRequest calls the generic PostApplications builder with application/json body -func NewPostApplicationsRequest(server string, params *PostApplicationsParams, body PostApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostApplications builder with application/vnd.pgrst.object+json body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostApplicationsRequestWithBody generates requests for PostApplications with any type of body -func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteGatewaysRequest generates requests for DeleteGateways -func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetGatewaysRequest generates requests for GetGateways -func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchGatewaysRequest calls the generic PatchGateways builder with application/json body -func NewPatchGatewaysRequest(server string, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchGatewaysRequestWithBody generates requests for PatchGateways with any type of body -func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostGatewaysRequest calls the generic PostGateways builder with application/json body -func NewPostGatewaysRequest(server string, params *PostGatewaysParams, body PostGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostGateways builder with application/vnd.pgrst.object+json body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostGatewaysRequestWithBody generates requests for PostGateways with any type of body -func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteNetworksRequest generates requests for DeleteNetworks -func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetNetworksRequest generates requests for GetNetworks -func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body -func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body -func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body -func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body -func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations -func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetOrganizationsRequest generates requests for GetOrganizations -func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body -func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body -func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body -func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body -func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts -func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalAccountsRequest generates requests for GetPortalAccounts -func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body -func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body -func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body -func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body -func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications -func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalApplicationsRequest generates requests for GetPortalApplications -func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body -func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body -func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body -func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body -func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalPlansRequest generates requests for DeletePortalPlans -func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalPlansRequest generates requests for GetPortalPlans -func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body -func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body -func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body -func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body -func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcMeRequest generates requests for GetRpcMe -func NewGetRpcMeRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcMeRequest calls the generic PostRpcMe builder with application/json body -func NewPostRpcMeRequest(server string, params *PostRpcMeParams, body PostRpcMeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcMeRequestWithBody generates requests for PostRpcMe with any type of body -func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints -func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints -func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body -func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body -func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body -func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body -func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks -func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks -func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body -func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body -func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body -func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body -func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServicesRequest generates requests for DeleteServices -func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServicesRequest generates requests for GetServices -func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServicesRequest calls the generic PatchServices builder with application/json body -func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body -func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServicesRequest calls the generic PostServices builder with application/json body -func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServicesRequestWithBody generates requests for PostServices with any type of body -func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetWithResponse request - GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) - - // DeleteApplicationsWithResponse request - DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) - - // GetApplicationsWithResponse request - GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) - - // PatchApplicationsWithBodyWithResponse request with any body - PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - // PostApplicationsWithBodyWithResponse request with any body - PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - // DeleteGatewaysWithResponse request - DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) - - // GetGatewaysWithResponse request - GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) - - // PatchGatewaysWithBodyWithResponse request with any body - PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - // PostGatewaysWithBodyWithResponse request with any body - PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - // DeleteNetworksWithResponse request - DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) - - // GetNetworksWithResponse request - GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) - - // PatchNetworksWithBodyWithResponse request with any body - PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - // PostNetworksWithBodyWithResponse request with any body - PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - // DeleteOrganizationsWithResponse request - DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) - - // GetOrganizationsWithResponse request - GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) - - // PatchOrganizationsWithBodyWithResponse request with any body - PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - // PostOrganizationsWithBodyWithResponse request with any body - PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - // DeletePortalAccountsWithResponse request - DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) - - // GetPortalAccountsWithResponse request - GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) - - // PatchPortalAccountsWithBodyWithResponse request with any body - PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - // PostPortalAccountsWithBodyWithResponse request with any body - PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - // DeletePortalApplicationsWithResponse request - DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) - - // GetPortalApplicationsWithResponse request - GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) - - // PatchPortalApplicationsWithBodyWithResponse request with any body - PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - // PostPortalApplicationsWithBodyWithResponse request with any body - PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - // DeletePortalPlansWithResponse request - DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) - - // GetPortalPlansWithResponse request - GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) - - // PatchPortalPlansWithBodyWithResponse request with any body - PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - // PostPortalPlansWithBodyWithResponse request with any body - PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - // GetRpcMeWithResponse request - GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) - - // PostRpcMeWithBodyWithResponse request with any body - PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - // DeleteServiceEndpointsWithResponse request - DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) - - // GetServiceEndpointsWithResponse request - GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) - - // PatchServiceEndpointsWithBodyWithResponse request with any body - PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - // PostServiceEndpointsWithBodyWithResponse request with any body - PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - // DeleteServiceFallbacksWithResponse request - DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) - - // GetServiceFallbacksWithResponse request - GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) - - // PatchServiceFallbacksWithBodyWithResponse request with any body - PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - // PostServiceFallbacksWithBodyWithResponse request with any body - PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - // DeleteServicesWithResponse request - DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) - - // GetServicesWithResponse request - GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) - - // PatchServicesWithBodyWithResponse request with any body - PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - // PostServicesWithBodyWithResponse request with any body - PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) -} - -type GetResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Applications - ApplicationvndPgrstObjectJSON200 *[]Applications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Applications -} - -// Status returns HTTPResponse.Status -func (r GetApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Gateways - ApplicationvndPgrstObjectJSON200 *[]Gateways - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Gateways -} - -// Status returns HTTPResponse.Status -func (r GetGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetNetworksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Networks - ApplicationvndPgrstObjectJSON200 *[]Networks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks -} - -// Status returns HTTPResponse.Status -func (r GetNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Organizations - ApplicationvndPgrstObjectJSON200 *[]Organizations - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts -} - -// Status returns HTTPResponse.Status -func (r GetPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications -} - -// Status returns HTTPResponse.Status -func (r GetPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans -} - -// Status returns HTTPResponse.Status -func (r GetPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcMeResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcMeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcMeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcMeResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcMeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcMeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints -} - -// Status returns HTTPResponse.Status -func (r GetServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks -} - -// Status returns HTTPResponse.Status -func (r GetServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServicesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Services - ApplicationvndPgrstObjectJSON200 *[]Services - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services -} - -// Status returns HTTPResponse.Status -func (r GetServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// GetWithResponse request returning *GetResponse -func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { - rsp, err := c.Get(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetResponse(rsp) -} - -// DeleteApplicationsWithResponse request returning *DeleteApplicationsResponse -func (c *ClientWithResponses) DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) { - rsp, err := c.DeleteApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteApplicationsResponse(rsp) -} - -// GetApplicationsWithResponse request returning *GetApplicationsResponse -func (c *ClientWithResponses) GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) { - rsp, err := c.GetApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApplicationsResponse(rsp) -} - -// PatchApplicationsWithBodyWithResponse request with arbitrary body returning *PatchApplicationsResponse -func (c *ClientWithResponses) PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -// PostApplicationsWithBodyWithResponse request with arbitrary body returning *PostApplicationsResponse -func (c *ClientWithResponses) PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -// DeleteGatewaysWithResponse request returning *DeleteGatewaysResponse -func (c *ClientWithResponses) DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) { - rsp, err := c.DeleteGateways(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteGatewaysResponse(rsp) -} - -// GetGatewaysWithResponse request returning *GetGatewaysResponse -func (c *ClientWithResponses) GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) { - rsp, err := c.GetGateways(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetGatewaysResponse(rsp) -} - -// PatchGatewaysWithBodyWithResponse request with arbitrary body returning *PatchGatewaysResponse -func (c *ClientWithResponses) PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGateways(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -// PostGatewaysWithBodyWithResponse request with arbitrary body returning *PostGatewaysResponse -func (c *ClientWithResponses) PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGateways(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -// DeleteNetworksWithResponse request returning *DeleteNetworksResponse -func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { - rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteNetworksResponse(rsp) -} - -// GetNetworksWithResponse request returning *GetNetworksResponse -func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { - rsp, err := c.GetNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetNetworksResponse(rsp) -} - -// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse -func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse -func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse -func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { - rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteOrganizationsResponse(rsp) -} - -// GetOrganizationsWithResponse request returning *GetOrganizationsResponse -func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { - rsp, err := c.GetOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationsResponse(rsp) -} - -// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse -func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse -func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse -func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { - rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalAccountsResponse(rsp) -} - -// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse -func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { - rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalAccountsResponse(rsp) -} - -// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse -func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse -func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse -func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { - rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalApplicationsResponse(rsp) -} - -// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse -func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { - rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalApplicationsResponse(rsp) -} - -// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse -func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse -func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse -func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { - rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalPlansResponse(rsp) -} - -// GetPortalPlansWithResponse request returning *GetPortalPlansResponse -func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { - rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalPlansResponse(rsp) -} - -// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse -func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse -func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -// GetRpcMeWithResponse request returning *GetRpcMeResponse -func (c *ClientWithResponses) GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) { - rsp, err := c.GetRpcMe(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcMeResponse(rsp) -} - -// PostRpcMeWithBodyWithResponse request with arbitrary body returning *PostRpcMeResponse -func (c *ClientWithResponses) PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMe(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse -func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { - rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceEndpointsResponse(rsp) -} - -// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse -func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { - rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceEndpointsResponse(rsp) -} - -// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse -func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse -func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse -func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { - rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceFallbacksResponse(rsp) -} - -// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse -func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { - rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceFallbacksResponse(rsp) -} - -// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse -func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse -func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -// DeleteServicesWithResponse request returning *DeleteServicesResponse -func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { - rsp, err := c.DeleteServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServicesResponse(rsp) -} - -// GetServicesWithResponse request returning *GetServicesResponse -func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { - rsp, err := c.GetServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServicesResponse(rsp) -} - -// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse -func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse -func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -// ParseGetResponse parses an HTTP response from a GetWithResponse call -func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteApplicationsResponse parses an HTTP response from a DeleteApplicationsWithResponse call -func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetApplicationsResponse parses an HTTP response from a GetApplicationsWithResponse call -func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchApplicationsResponse parses an HTTP response from a PatchApplicationsWithResponse call -func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostApplicationsResponse parses an HTTP response from a PostApplicationsWithResponse call -func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteGatewaysResponse parses an HTTP response from a DeleteGatewaysWithResponse call -func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetGatewaysResponse parses an HTTP response from a GetGatewaysWithResponse call -func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchGatewaysResponse parses an HTTP response from a PatchGatewaysWithResponse call -func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostGatewaysResponse parses an HTTP response from a PostGatewaysWithResponse call -func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call -func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call -func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call -func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call -func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call -func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call -func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call -func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call -func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call -func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call -func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call -func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call -func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call -func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call -func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call -func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call -func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call -func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call -func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call -func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call -func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetRpcMeResponse parses an HTTP response from a GetRpcMeWithResponse call -func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetRpcMeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostRpcMeResponse parses an HTTP response from a PostRpcMeWithResponse call -func ParsePostRpcMeResponse(rsp *http.Response) (*PostRpcMeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostRpcMeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call -func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call -func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call -func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call -func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call -func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call -func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call -func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call -func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call -func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call -func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call -func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call -func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// Base64 encoded, gzipped, json marshaled Swagger object -var swaggerSpec = []string{ - - "H4sIAAAAAAAC/+w9XY/cNpJ/hdAdYAfX7u44H8DOwQ+Ok+zlNnEGY/vuITF6ORK7mxmJkklqxrOB//tC", - "35REURJJSTOOXgxPq1hVIutbLPJPxw2DKCSIcOZc/OlEkMIAcUTTv3wcYJ78x0PMpTjiOCTOhfNz8jMm", - "JwCJBy7hCROYPtk4OHn8IUb03tk4BAbIuciRbBzmnlEAE2z8PkoeME4xOTmfPm2c8HhkyJhSjqWHFPUQ", - "bVP6Nfk5gelAnY5SY44oOiL6KoyJ5E0u04eIuKigcEYww5mTyCBqNBCJA+fiN8dNcL4gIUHO+00n5ctk", - "7Zhl0qlAsBcMk5OPnoXXfyCXK5kIme23p4jHlLygKKKIIcILEch/DzDBAfSrH9J5Sv5ioR8nsC/wiYQU", - "PfPiyMcu5IjVHweInmpPFe93ldJ4CG8oZZJCckKj9ajJ6lWKRS3tKaV3RMM+SKk9S1GJJD10hLHPnQsH", - "cxQkSyZhIrz7Efsc0S2MstXDIWHiHwfoeRQxiVp854fujXuGmIAcBoRHwM8ICMM7zIGMgMj7MaQBTFh3", - "z5BClyMKbiG9z+yL1mtEFN9Cjg436P5wRh8TIn2MNYfYZ9ClCHLkHSDv4keAkJLnOECMwyACd5ifQfIn", - "+Femv4O5OEGO7uC9uNIyVppg9qeDIH4X0psD9rp4ECDsk2eI3mIXKcgLEBOQ5/AGHWBQ+D8pAyKMlIVr", - "fMLps5F0PUTCQE02A7H/4nHk9WiBAGFTC3KJXlAPSw4kOjjU2uZDOyztJFrbYnugde0Ct8vU/GakJN3U", - "4foavkx/T9ctvEGEgRTcA9f3AxbSkuo3WJ1X7Uvii6l8vvJLCElIT5Dgfy3t+utseMhHFRt1cX0THjnI", - "AEBJrEM6BTzTMSv+pVi4JpiUIUw4OqVRtCb9jFhzzl7DABWGWQTvTIubGCcQtcWULQoph/4Bumn+zbbX", - "2PcxOR2yMXJWajBWJqPJxWKa12SkrnszalWTkZMbFX8o1KoBNcnaJDQQ4Zj7KEC93DQgJ+EosROUVL+U", - "ei9jSg48CV/z28ImB/W/cx7q1vAdwR9iBLCXrNQRIwqOIU1tYzYY5IM7rGObgpT9OE6fGPAeM0QPZbF2", - "ACvCgOlmtCJySAXrFvqj2atGSvmM4msfu9vIh0SEtMM0jdh4fpNB9qc0fUGV22nBTaK0CVCEDiy+LrVE", - "qjdvUjggwjWVKPeTncmClNAkL/VgwotUioaY6Tag1Yl5EBU+GTOLBxwiMygI/8BdfGQPJ1uVI7wNKebo", - "UBX0Ok2VFHYYZ7+91+BN6lbn8Y4yNoR6eM1GqXnqGDXZgkro9k9cHXjiyVPZoy7wOadreAgkH2TBZw/m", - "cHA41DPadkg0/AUGhEbdAy1PNUMuRTyrxUJ2bkcj/wPZGXkggwM36D4NQAQcAMb8nEQnym9+TTqTSbdA", - "iKIPMaZI8UGnDSqvrYahjyDR4Gbp8CgRZJaJsyhTalWXQ5sLnsAMhRzVtaEudVeQI5A+B5iAZHUQ4wxE", - "iCaSGBKvK2mUILfKeMzgCR06tvb8Aj/iIA5ACgSg74d3yEvXDZM08RVMSif3IoWpWO+3oZ0DLJvNnL+H", - "kKjJWRkR+MjHWGGxCD8R8aIQL1rIbLNS/E8RdYkgBkKtoK0SmzqQSoKbkOOYmX8PQZuHxTxOwcoR+v41", - "dG8egIhWrBT/O8TU7871BBirq1Px0fxlgKiIoBZUp83L/NJa8bC0tLItdDm+7bQc+VODqLAk5IZBFHN0", - "iAnm7BAheqDIh/ftKOJVyNKoJx8A0gFp1I2gewbZKHkA0UXDXG6W1+YFK1glB2dIvUohEYHXfnd6IQe2", - "IUrzb18oSX+IoY/5/eBJ6IS3MQ+FPfHCAGIiSSP+D/rYA/nj/PMTZiAf15mq1rFaKve1uJ7d7lakVfWo", - "Gsw05MM7gmjfjlM5sGWGbk8H7HYH9uVzuTVBH/lQSjM7OoZ85Eoy1IwtTE7gVejHQSrd8slPx6s2sSfv", - "meXl34UeRuk6irWP5G83JBxlm+GER7s/WDblFfL/pOjoXDj/sasaanbZU7arIU3IiqhuibeNTpTxbdZd", - "8V9T4/5vEvs+e5F+Y4syu6dJKhGfnctutVF82jRWt/58U+y4tLcUJULLyzAOr/YS1MiMn35heGvqq2eb", - "wvnam/YSoeVpH4dXe9prZMZPuzC8Ne3Vs01tt4u9ua9jtbwAGsi1V6FNa/xSNHG01qMBsGl8p7S3LE28", - "lhdGC7320siojV+cNpbW8rRANpIvTvYXaUIHrk3CeLHM3bkcU+eiNZy7WLW2vWIZ0mmWagRu0zWqSGkv", - "ToGia1Xy5xunVYm1tiZtzJYXRpOA9urI6Y1fIhme1jpJgDat2qr9xaowT7RYIwkYL1adnv5iiXg6F0sA", - "KhfL+hpNtTQzrYjhQqjmP0OdD5Dl9Y3TH0jemihApcW2iIYuYgyTU1a1ZoCfaRifzunH8Dx2dzZORMMI", - "Ud4uIhj2n/9OfievQ44ufidvz5gBzAAElxQHkN6Df6D77e/xfv+VG93s0v8gZ6OuKQXw48+InPjZufhm", - "3yq7bJyelvOhuL/9WoK7Xn6v2vtfvbu6+uH128Pbn3754c3bl79cii8xvGa0cXqbUFsz+WNIET6RZCYB", - "D8E/u/pZ/5nP8/EGcHjtoxdPCsgnwE3LUOUvxZAnllakXikf+T6SdsH2qxRA1atU0Bpv8fVzyVvUK8Yj", - "30JSd26/RQFUvUUFbe0tGu2xna2rxYepckzZpzqU/pffSOjXS7DWNSivh2Ybzn7rOORC0pAt1voFca0O", - "KMmPjWnU8+QmOIcAmGRvkPYOENePvcQIp7OZniuSEwIe4hD7rGWDl7c2vS3vcxt3Rbe7kWH/TEyUnd73", - "z9smSLS/0ddf67nvsQZimbnRQRRHSXqaTHClRQU4eHoZujeIgwBiQhDfAI4YT/+DuLv9omULRgmoHQWU", - "iFhjKnvmplULbm6xCCJIMGIgpMCNGQ8DRMGJhnGUxKiQAxcScI0A5By6Z+QlynaZdS2+LIpns9tMnXZ9", - "LUKS9lI7y97aciKotVl//WAT/LfFrUC7K7f96jKZlpTSG9uPY5/jZxwRSHjRXMsy7tIyVer589bBdCvy", - "iRbTV5fkZqv+0Ml9vl8icamrhV400uqBH/zK33zTga/dyW6Gs7MX3chvj1f1ZgiiPKWjHYzUwKuIpDHu", - "yUjj0dGOXsjaCZEDhcQLg0McY+9p4uT0mtVNok55P9nGUfaj67x+R7NUcWCil4ZaQUj42dk49wjSxN6M", - "3My/cXp7v8ewXtv6P1IClfv32xIoglcC2BxnLzCeoOvbzJJM7O42jrQX217sJ+t9bYmRyoMqq5kvxSpm", - "7ryKHp66Lch9Kz8jTEF4RwAtu5YyX8sQ55icFg8VtVCULdqDE6xvJVi6mq17NlJmh5a2d52VFCCl8F5h", - "+XUMSPfhJp1GpBjSsiPV2CcanqC779pM8zs7pce4yqncn6Rf2sjy9vY5j3Kt/b3IE7lXZQ/xoFeYosfX", - "TA47mnRLKTxCn6FyXLErfPZMreusgLbNUXibcoNGw83cQuwntqTu8rNELZn+vnJDd1PvMLm21YY7nJq1", - "3lktkjPo6pggdrJC2cbpa2Edjnw/UEPUYZd0a0yXNhRAIEEjtD1VPRszh1KN7tbpC2GtltbqIoMA8e9+", - "fOtsHDdkQZjYhKsf3iR//++bX18/u7p85Wyc/3/zxtk4p+QPiSj3NLh+Lt8a5/UTje7magZV2lDbe9To", - "0sgfgXdXP2cqUMwZuDsjAqJcyEqFAkeI/flVo9lVaxoUSHtjp1e4VeTHi3xHd7L4MbsmHQpNGPoBq9SB", - "Iw2DNCTIP2S97tpIVLb29geWtrtzBwneYygDdLa89s/p5/FlW9Xx2j8H5i2q1iolo8zchOFpswl1eH3p", - "bwpsrZ7Sx795TexO7Wk6Xcr816x+0THcEPm26U+woY/Z56zvQ1d261bI+CmJbcH3oRsHwq1OaajhnDmP", - "2MVuFyVwFDG+Delph8ju9svn2/0ORnh75oGffTc7hql+YO7n9xoQD1IPZBExyHfNbpxbRFlGPcGxfQ6e", - "wq/Rfn88fpF+KIsQgRF2LpyvtvvtPnE2kJ9T1nfJP6fsBrbE/6Ss/uQ5F87f0wvVKGJRSFjmlJ7v95Lt", - "W//IdtzGQaJ0yQ8RIi8vfwICGHiaGgYvn48vkjWCJ5asxk+E05BFyE3RvU9Q7dpF7sQVtFn8Pv1dLHqn", - "r1ZdZPebfDtxBbIbcY/Up40utubeGX1MguwaIBE37piiyTb86GNR7TvWxyq4b30kQoijj0SwbQOQ1K6a", - "+/S+pX9fy7wDeJV3FjT00HRre6GiNXV8/2nTaS9WTVw18XPRxPwUiQGQ2Q2hQ/hKL1ccCpheiziEfHb3", - "6QDIrHo92Apl95lKjNB+VDdTGeQPPx2iGf+Pb3WaiaiyD8oOD/ImKRu4Wx1USSS3cZ7vv5XEtJByDP3Z", - "PU0EuXtu+5rL5OfV26ze5jOO+4rjie671Lx2glFL2R9k4Bjld0Q3tDlkZqHjcF8tXFU9xSx/Kam5ZsI0", - "0xQn2XO900qVOf+9gNS3np33gI7SHPk1lCYoNMyT7BpOPQRd7VZ62HTNkezOyoVSUP3WvkLOS6FW5Z+r", - "PK/yvCZyiyZy4llysyRxZgTNEzglfYPkTYHXfuJm2T6rsrbVRq82eoL0R1SXhxewdOc92uowX86jmNrR", - "+Y7VeU2SnXojuSrZeV1A6hse2R3sM0fUpu3xxTSW86aKp5ebsjVomzNoE0+inSVoMyNoHrQp6RsEbQq8", - "9oK2SUyAKmR7UJZzpPMSV+Shmd3uqEB7xueLChQTOzgqmGBWk5hAcoCKKjD4tQauL+PKwwTGhdEKVOlG", - "NQNkwrZaAyy6+UEdy3KFSUuH6BQCWJc4VUi1CtvjELY1AJ0zAG0dvT9LFGqBqnko2s+EQTzah9xeUDq5", - "QVUFqKtRfbQefGTU2RLohxwDdMf3ZgI7X5DfN92DI/2J5zqJ+qVHzKni/gy9eEaBptnoPYJlnIY10RnZ", - "oQ7eqqZ3I2ztw5KM0MmPibPxvpLzyaZBWx21MBF+GjEz1LUDEo0wdRwPZoSzcZqhMa7GSYZG+HQdbxOP", - "ruttad9i6bPBaZ2FCW+aa1XSvFrq1VKvlnq11H8RS73WnuasPUnuFZyl+mSFrnn9aQgbBhWofvT2alAT", - "RSWqytMamayRyRqZrJHJXzeHHFlRlPiDh5eHdhduDe39fJXb/nkeXLudZJLFiu2o017yFbDT+yvhYCs/", - "OFdLyWRoDe1SD6f6zk5EnB2fPgV/pr5zMHpDHzqcjrYv7SEhaqYxfulJ9sZYm2dz20RYHthljNTU49ro", - "DJfhWq56O80tEU1bP/TQoNWgrwZ9NeirQf+LGfS1yLtEkXeJY6as0bZX7J3w0KlhJOwVfZcJZgbUhNeA", - "Zg1o1oBmDWj+whmqZs3S3klmCzmHvvLx4zjrbNhyDC4jL7EWQpVZuMqsv7x8mQIbe235ra5aiilHZWyD", - "c7TNG87soTLzcgLOxnVvhtjad8/NXYMbf4VeQ9Qzge6vrK2yvMryWn54EOWHTGVnrjsYELVWcOjmwbzS", - "0IXbYonBoq3uLxys9nq11xNmV6W6PJDgpS9Z0lOH2bOkrmkdnh5Zm9Mk6aGRu8tuKOsKDq8i9xc05oKn", - "gtpTGrlfgAD1rF6Bf9y65auR/MBk6zHYLTdv7RrtYjUQKN1lG5/c9UmuG6suL+M0Rp/M1iyRjo5LjVV5", - "8ZtsyA/lCH0H1aK+Fe+gHWVc26h0L0pQMDXeb7aR6Zbl2pgW3DYy4p7rQvDakqZKWFche5RCtuaSc+aS", - "bZWaK6G0RNk8qxzGiEFqOYTAFPmlqWFVZZercf1cPPjIDEUqzA8iDujOHoyFdb4EcMj0amSBZnMrRvnF", - "5d/Do/wfyxHmNqKkvpVdu6+lSm2U5phqF/4b4jI1FRWm5YL9QgTAu6ufM+nLuWPg7owIiPI71kuhA0eI", - "fYlUVtI3IPJfBe9RCt6aACyRAFSaNXcCYEjZXgKgZsRCAqAiYC8BmMjYDsgGVoP7uXh6zai1JuAPL17o", - "zRD0BXj+DEE114MzhEkmWkgXhmcJFmyGsV5XCMbvKy9RJIAxR4eYYM4OEaKH9OpVQ4a8MICYMEMs4R1B", - "VO+CsxKX7t1iJQLocnyrO7sfYuhjfl85A0SSBFeXlzOkni1c7PZ0wO7Y7QvlcN1925XgmbmPJfND6dUd", - "pSU60jBILyzOr/B43bq3uLQ2A7LC1dCshmY1NI/I0Kz1gAXqAbOXAZbO/qdK+he4vU3XcQ7I8FfnuTrP", - "1Xk+7ihdr94wyZ2H2paqr5DzCAo49u861JvNFDGit8U8xdR3Lpwz59HFbueHLvTPIeMXX+33e+fT+0//", - "DgAA//+VSNG26gMBAA==", -} - -// GetSwagger returns the content of the embedded swagger specification file -// or error if failed to decode -func decodeSpec() ([]byte, error) { - zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) - if err != nil { - return nil, fmt.Errorf("error base64 decoding spec: %w", err) - } - zr, err := gzip.NewReader(bytes.NewReader(zipped)) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %w", err) - } - var buf bytes.Buffer - _, err = buf.ReadFrom(zr) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %w", err) - } - - return buf.Bytes(), nil -} - -var rawSpec = decodeSpecCached() - -// a naive cached of a decoded swagger spec -func decodeSpecCached() func() ([]byte, error) { - data, err := decodeSpec() - return func() ([]byte, error) { - return data, err - } -} - -// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. -func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { - res := make(map[string]func() ([]byte, error)) - if len(pathToFile) > 0 { - res[pathToFile] = rawSpec - } - - return res -} - -// GetSwagger returns the Swagger specification corresponding to the generated code -// in this file. The external references of Swagger specification are resolved. -// The logic of resolving external references is tightly connected to "import-mapping" feature. -// Externally referenced files must be embedded in the corresponding golang packages. -// Urls can be supported but this task was out of the scope. -func GetSwagger() (swagger *openapi3.T, err error) { - resolvePath := PathToRawSpec("") - - loader := openapi3.NewLoader() - loader.IsExternalRefsAllowed = true - loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { - pathToFile := url.String() - pathToFile = path.Clean(pathToFile) - getSpec, ok := resolvePath[pathToFile] - if !ok { - err1 := fmt.Errorf("path not found: %s", pathToFile) - return nil, err1 - } - return getSpec() - } - var specData []byte - specData, err = rawSpec() - if err != nil { - return - } - swagger, err = loader.LoadFromData(specData) - if err != nil { - return - } - return -} diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go deleted file mode 100644 index c7ea4d73e..000000000 --- a/portal-db/sdk/go/models.go +++ /dev/null @@ -1,1947 +0,0 @@ -// Package portaldb provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. -package portaldb - -import ( - openapi_types "github.com/oapi-codegen/runtime/types" -) - -// Defines values for PortalAccountsPortalAccountUserLimitInterval. -const ( - PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" - PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" - PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" -) - -// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. -const ( - PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" - PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" - PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" -) - -// Defines values for PortalPlansPlanUsageLimitInterval. -const ( - Day PortalPlansPlanUsageLimitInterval = "day" - Month PortalPlansPlanUsageLimitInterval = "month" - Year PortalPlansPlanUsageLimitInterval = "year" -) - -// Defines values for ServiceEndpointsEndpointType. -const ( - CometBFT ServiceEndpointsEndpointType = "cometBFT" - Cosmos ServiceEndpointsEndpointType = "cosmos" - GRPC ServiceEndpointsEndpointType = "gRPC" - JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" - REST ServiceEndpointsEndpointType = "REST" - WSS ServiceEndpointsEndpointType = "WSS" -) - -// Defines values for PreferCount. -const ( - PreferCountCountNone PreferCount = "count=none" -) - -// Defines values for PreferParams. -const ( - PreferParamsParamsSingleObject PreferParams = "params=single-object" -) - -// Defines values for PreferPost. -const ( - PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" - PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" - PreferPostReturnMinimal PreferPost = "return=minimal" - PreferPostReturnNone PreferPost = "return=none" - PreferPostReturnRepresentation PreferPost = "return=representation" -) - -// Defines values for PreferReturn. -const ( - PreferReturnReturnMinimal PreferReturn = "return=minimal" - PreferReturnReturnNone PreferReturn = "return=none" - PreferReturnReturnRepresentation PreferReturn = "return=representation" -) - -// Defines values for DeleteApplicationsParamsPrefer. -const ( - DeleteApplicationsParamsPreferReturnMinimal DeleteApplicationsParamsPrefer = "return=minimal" - DeleteApplicationsParamsPreferReturnNone DeleteApplicationsParamsPrefer = "return=none" - DeleteApplicationsParamsPreferReturnRepresentation DeleteApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetApplicationsParamsPrefer. -const ( - GetApplicationsParamsPreferCountNone GetApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchApplicationsParamsPrefer. -const ( - PatchApplicationsParamsPreferReturnMinimal PatchApplicationsParamsPrefer = "return=minimal" - PatchApplicationsParamsPreferReturnNone PatchApplicationsParamsPrefer = "return=none" - PatchApplicationsParamsPreferReturnRepresentation PatchApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostApplicationsParamsPrefer. -const ( - PostApplicationsParamsPreferResolutionIgnoreDuplicates PostApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostApplicationsParamsPreferResolutionMergeDuplicates PostApplicationsParamsPrefer = "resolution=merge-duplicates" - PostApplicationsParamsPreferReturnMinimal PostApplicationsParamsPrefer = "return=minimal" - PostApplicationsParamsPreferReturnNone PostApplicationsParamsPrefer = "return=none" - PostApplicationsParamsPreferReturnRepresentation PostApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeleteGatewaysParamsPrefer. -const ( - DeleteGatewaysParamsPreferReturnMinimal DeleteGatewaysParamsPrefer = "return=minimal" - DeleteGatewaysParamsPreferReturnNone DeleteGatewaysParamsPrefer = "return=none" - DeleteGatewaysParamsPreferReturnRepresentation DeleteGatewaysParamsPrefer = "return=representation" -) - -// Defines values for GetGatewaysParamsPrefer. -const ( - GetGatewaysParamsPreferCountNone GetGatewaysParamsPrefer = "count=none" -) - -// Defines values for PatchGatewaysParamsPrefer. -const ( - PatchGatewaysParamsPreferReturnMinimal PatchGatewaysParamsPrefer = "return=minimal" - PatchGatewaysParamsPreferReturnNone PatchGatewaysParamsPrefer = "return=none" - PatchGatewaysParamsPreferReturnRepresentation PatchGatewaysParamsPrefer = "return=representation" -) - -// Defines values for PostGatewaysParamsPrefer. -const ( - PostGatewaysParamsPreferResolutionIgnoreDuplicates PostGatewaysParamsPrefer = "resolution=ignore-duplicates" - PostGatewaysParamsPreferResolutionMergeDuplicates PostGatewaysParamsPrefer = "resolution=merge-duplicates" - PostGatewaysParamsPreferReturnMinimal PostGatewaysParamsPrefer = "return=minimal" - PostGatewaysParamsPreferReturnNone PostGatewaysParamsPrefer = "return=none" - PostGatewaysParamsPreferReturnRepresentation PostGatewaysParamsPrefer = "return=representation" -) - -// Defines values for DeleteNetworksParamsPrefer. -const ( - DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" - DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" - DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" -) - -// Defines values for GetNetworksParamsPrefer. -const ( - GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" -) - -// Defines values for PatchNetworksParamsPrefer. -const ( - PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" - PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" - PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" -) - -// Defines values for PostNetworksParamsPrefer. -const ( - PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" - PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" - PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" - PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" - PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" -) - -// Defines values for DeleteOrganizationsParamsPrefer. -const ( - DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" - DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" - DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for GetOrganizationsParamsPrefer. -const ( - GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" -) - -// Defines values for PatchOrganizationsParamsPrefer. -const ( - PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" - PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" - PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for PostOrganizationsParamsPrefer. -const ( - PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" - PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" - PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" - PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" - PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalAccountsParamsPrefer. -const ( - DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" - DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" - DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalAccountsParamsPrefer. -const ( - GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalAccountsParamsPrefer. -const ( - PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" - PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" - PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalAccountsParamsPrefer. -const ( - PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" - PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" - PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" - PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" - PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalApplicationsParamsPrefer. -const ( - DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" - DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" - DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalApplicationsParamsPrefer. -const ( - GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalApplicationsParamsPrefer. -const ( - PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" - PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" - PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalApplicationsParamsPrefer. -const ( - PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" - PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" - PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" - PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalPlansParamsPrefer. -const ( - DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" - DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" - DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" -) - -// Defines values for GetPortalPlansParamsPrefer. -const ( - GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" -) - -// Defines values for PatchPortalPlansParamsPrefer. -const ( - PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" - PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" - PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for PostPortalPlansParamsPrefer. -const ( - PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" - PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" - PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" - PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" - PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for PostRpcMeParamsPrefer. -const ( - PostRpcMeParamsPreferParamsSingleObject PostRpcMeParamsPrefer = "params=single-object" -) - -// Defines values for DeleteServiceEndpointsParamsPrefer. -const ( - DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" - DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" - DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for GetServiceEndpointsParamsPrefer. -const ( - GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" -) - -// Defines values for PatchServiceEndpointsParamsPrefer. -const ( - PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" - PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" - PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for PostServiceEndpointsParamsPrefer. -const ( - PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" - PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" - PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" - PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" - PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for DeleteServiceFallbacksParamsPrefer. -const ( - DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" - DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" - DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for GetServiceFallbacksParamsPrefer. -const ( - GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" -) - -// Defines values for PatchServiceFallbacksParamsPrefer. -const ( - PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" - PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" - PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for PostServiceFallbacksParamsPrefer. -const ( - PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" - PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" - PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" - PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" - PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for DeleteServicesParamsPrefer. -const ( - DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" - DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" - DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" -) - -// Defines values for GetServicesParamsPrefer. -const ( - CountNone GetServicesParamsPrefer = "count=none" -) - -// Defines values for PatchServicesParamsPrefer. -const ( - PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" - PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" - PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" -) - -// Defines values for PostServicesParamsPrefer. -const ( - PostServicesParamsPreferResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" - PostServicesParamsPreferResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" - PostServicesParamsPreferReturnMinimal PostServicesParamsPrefer = "return=minimal" - PostServicesParamsPreferReturnNone PostServicesParamsPrefer = "return=none" - PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" -) - -// Applications Onchain applications for processing relays through the network -type Applications struct { - // ApplicationAddress Blockchain address of the application - // - // Note: - // This is a Primary Key. - ApplicationAddress string `json:"application_address"` - ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Note: - // This is a Foreign Key to `gateways.gateway_address`. - GatewayAddress string `json:"gateway_address"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - StakeAmount *int `json:"stake_amount,omitempty"` - StakeDenom *string `json:"stake_denom,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Gateways Onchain gateway information including stake and network details -type Gateways struct { - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Blockchain address of the gateway - // - // Note: - // This is a Primary Key. - GatewayAddress string `json:"gateway_address"` - GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount int `json:"stake_amount"` - StakeDenom string `json:"stake_denom"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) -type Networks struct { - // NetworkId Note: - // This is a Primary Key. - NetworkId string `json:"network_id"` -} - -// Organizations Companies or customer groups that can be attached to Portal Accounts -type Organizations struct { - CreatedAt *string `json:"created_at,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *string `json:"deleted_at,omitempty"` - - // OrganizationId Note: - // This is a Primary Key. - OrganizationId int `json:"organization_id"` - - // OrganizationName Name of the organization - OrganizationName string `json:"organization_name"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalAccounts Multi-tenant accounts with plans and billing integration -type PortalAccounts struct { - BillingType *string `json:"billing_type,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - GcpAccountId *string `json:"gcp_account_id,omitempty"` - GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` - InternalAccountName *string `json:"internal_account_name,omitempty"` - - // OrganizationId Note: - // This is a Foreign Key to `organizations.organization_id`. - OrganizationId *int `json:"organization_id,omitempty"` - - // PortalAccountId Unique identifier for the portal account - // - // Note: - // This is a Primary Key. - PortalAccountId openapi_types.UUID `json:"portal_account_id"` - PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` - - // PortalPlanType Note: - // This is a Foreign Key to `portal_plans.portal_plan_type`. - PortalPlanType string `json:"portal_plan_type"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - UserAccountName *string `json:"user_account_name,omitempty"` -} - -// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. -type PortalAccountsPortalAccountUserLimitInterval string - -// PortalApplications Applications created within portal accounts with their own rate limits and settings -type PortalApplications struct { - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - Emoji *string `json:"emoji,omitempty"` - FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` - - // PortalAccountId Note: - // This is a Foreign Key to `portal_accounts.portal_account_id`. - PortalAccountId openapi_types.UUID `json:"portal_account_id"` - PortalApplicationDescription *string `json:"portal_application_description,omitempty"` - - // PortalApplicationId Note: - // This is a Primary Key. - PortalApplicationId openapi_types.UUID `json:"portal_application_id"` - PortalApplicationName *string `json:"portal_application_name,omitempty"` - PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *string `json:"secret_key_hash,omitempty"` - SecretKeyRequired *bool `json:"secret_key_required,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. -type PortalApplicationsPortalApplicationUserLimitInterval string - -// PortalPlans Available subscription plans for Portal Accounts -type PortalPlans struct { - PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` - - // PortalPlanType Note: - // This is a Primary Key. - PortalPlanType string `json:"portal_plan_type"` - PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` -} - -// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. -type PortalPlansPlanUsageLimitInterval string - -// ServiceEndpoints Available endpoint types for each service -type ServiceEndpoints struct { - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId Note: - // This is a Primary Key. - EndpointId int `json:"endpoint_id"` - EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. -type ServiceEndpointsEndpointType string - -// ServiceFallbacks Fallback URLs for services when primary endpoints fail -type ServiceFallbacks struct { - CreatedAt *string `json:"created_at,omitempty"` - FallbackUrl string `json:"fallback_url"` - - // ServiceFallbackId Note: - // This is a Primary Key. - ServiceFallbackId int `json:"service_fallback_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Services Supported blockchain services from the Pocket Network -type Services struct { - Active *bool `json:"active,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId *string `json:"network_id,omitempty"` - QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains []string `json:"service_domains"` - - // ServiceId Note: - // This is a Primary Key. - ServiceId string `json:"service_id"` - ServiceName string `json:"service_name"` - - // ServiceOwnerAddress Note: - // This is a Foreign Key to `gateways.gateway_address`. - ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` - SvgIcon *string `json:"svg_icon,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Limit defines model for limit. -type Limit = string - -// Offset defines model for offset. -type Offset = string - -// Order defines model for order. -type Order = string - -// PreferCount defines model for preferCount. -type PreferCount string - -// PreferParams defines model for preferParams. -type PreferParams string - -// PreferPost defines model for preferPost. -type PreferPost string - -// PreferReturn defines model for preferReturn. -type PreferReturn string - -// Range defines model for range. -type Range = string - -// RangeUnit defines model for rangeUnit. -type RangeUnit = string - -// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. -type RowFilterApplicationsApplicationAddress = string - -// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. -type RowFilterApplicationsApplicationPrivateKeyHex = string - -// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. -type RowFilterApplicationsCreatedAt = string - -// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. -type RowFilterApplicationsGatewayAddress = string - -// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. -type RowFilterApplicationsNetworkId = string - -// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. -type RowFilterApplicationsServiceId = string - -// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. -type RowFilterApplicationsStakeAmount = string - -// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. -type RowFilterApplicationsStakeDenom = string - -// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. -type RowFilterApplicationsUpdatedAt = string - -// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. -type RowFilterGatewaysCreatedAt = string - -// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. -type RowFilterGatewaysGatewayAddress = string - -// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. -type RowFilterGatewaysGatewayPrivateKeyHex = string - -// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. -type RowFilterGatewaysNetworkId = string - -// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. -type RowFilterGatewaysStakeAmount = string - -// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. -type RowFilterGatewaysStakeDenom = string - -// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. -type RowFilterGatewaysUpdatedAt = string - -// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. -type RowFilterNetworksNetworkId = string - -// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. -type RowFilterOrganizationsCreatedAt = string - -// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. -type RowFilterOrganizationsDeletedAt = string - -// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. -type RowFilterOrganizationsOrganizationId = string - -// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. -type RowFilterOrganizationsOrganizationName = string - -// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. -type RowFilterOrganizationsUpdatedAt = string - -// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. -type RowFilterPortalAccountsBillingType = string - -// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. -type RowFilterPortalAccountsCreatedAt = string - -// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. -type RowFilterPortalAccountsDeletedAt = string - -// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. -type RowFilterPortalAccountsGcpAccountId = string - -// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. -type RowFilterPortalAccountsGcpEntitlementId = string - -// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. -type RowFilterPortalAccountsInternalAccountName = string - -// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. -type RowFilterPortalAccountsOrganizationId = string - -// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. -type RowFilterPortalAccountsPortalAccountId = openapi_types.UUID - -// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. -type RowFilterPortalAccountsPortalAccountUserLimit = string - -// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. -type RowFilterPortalAccountsPortalAccountUserLimitInterval = string - -// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. -type RowFilterPortalAccountsPortalAccountUserLimitRps = string - -// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. -type RowFilterPortalAccountsPortalPlanType = string - -// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. -type RowFilterPortalAccountsStripeSubscriptionId = string - -// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. -type RowFilterPortalAccountsUpdatedAt = string - -// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. -type RowFilterPortalAccountsUserAccountName = string - -// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. -type RowFilterPortalApplicationsCreatedAt = string - -// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. -type RowFilterPortalApplicationsDeletedAt = string - -// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. -type RowFilterPortalApplicationsEmoji = string - -// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. -type RowFilterPortalApplicationsFavoriteServiceIds = string - -// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. -type RowFilterPortalApplicationsPortalAccountId = openapi_types.UUID - -// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. -type RowFilterPortalApplicationsPortalApplicationDescription = string - -// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. -type RowFilterPortalApplicationsPortalApplicationId = openapi_types.UUID - -// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. -type RowFilterPortalApplicationsPortalApplicationName = string - -// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. -type RowFilterPortalApplicationsPortalApplicationUserLimit = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. -type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. -type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string - -// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. -type RowFilterPortalApplicationsSecretKeyHash = string - -// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. -type RowFilterPortalApplicationsSecretKeyRequired = string - -// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. -type RowFilterPortalApplicationsUpdatedAt = string - -// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. -type RowFilterPortalPlansPlanApplicationLimit = string - -// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. -type RowFilterPortalPlansPlanRateLimitRps = string - -// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. -type RowFilterPortalPlansPlanUsageLimit = string - -// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. -type RowFilterPortalPlansPlanUsageLimitInterval = string - -// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. -type RowFilterPortalPlansPortalPlanType = string - -// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. -type RowFilterPortalPlansPortalPlanTypeDescription = string - -// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. -type RowFilterServiceEndpointsCreatedAt = string - -// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. -type RowFilterServiceEndpointsEndpointId = string - -// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. -type RowFilterServiceEndpointsEndpointType = string - -// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. -type RowFilterServiceEndpointsServiceId = string - -// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. -type RowFilterServiceEndpointsUpdatedAt = string - -// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. -type RowFilterServiceFallbacksCreatedAt = string - -// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. -type RowFilterServiceFallbacksFallbackUrl = string - -// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. -type RowFilterServiceFallbacksServiceFallbackId = string - -// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. -type RowFilterServiceFallbacksServiceId = string - -// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. -type RowFilterServiceFallbacksUpdatedAt = string - -// RowFilterServicesActive defines model for rowFilter.services.active. -type RowFilterServicesActive = string - -// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. -type RowFilterServicesComputeUnitsPerRelay = string - -// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. -type RowFilterServicesCreatedAt = string - -// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. -type RowFilterServicesDeletedAt = string - -// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. -type RowFilterServicesHardFallbackEnabled = string - -// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. -type RowFilterServicesNetworkId = string - -// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. -type RowFilterServicesQualityFallbackEnabled = string - -// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. -type RowFilterServicesServiceDomains = string - -// RowFilterServicesServiceId defines model for rowFilter.services.service_id. -type RowFilterServicesServiceId = string - -// RowFilterServicesServiceName defines model for rowFilter.services.service_name. -type RowFilterServicesServiceName = string - -// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. -type RowFilterServicesServiceOwnerAddress = string - -// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. -type RowFilterServicesSvgIcon = string - -// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. -type RowFilterServicesUpdatedAt = string - -// Select defines model for select. -type Select = string - -// DeleteApplicationsParams defines parameters for DeleteApplications. -type DeleteApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. -type DeleteApplicationsParamsPrefer string - -// GetApplicationsParams defines parameters for GetApplications. -type GetApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetApplicationsParamsPrefer defines parameters for GetApplications. -type GetApplicationsParamsPrefer string - -// PatchApplicationsParams defines parameters for PatchApplications. -type PatchApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchApplicationsParamsPrefer defines parameters for PatchApplications. -type PatchApplicationsParamsPrefer string - -// PostApplicationsParams defines parameters for PostApplications. -type PostApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostApplicationsParamsPrefer defines parameters for PostApplications. -type PostApplicationsParamsPrefer string - -// DeleteGatewaysParams defines parameters for DeleteGateways. -type DeleteGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. -type DeleteGatewaysParamsPrefer string - -// GetGatewaysParams defines parameters for GetGateways. -type GetGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// GetGatewaysParamsPrefer defines parameters for GetGateways. -type GetGatewaysParamsPrefer string - -// PatchGatewaysParams defines parameters for PatchGateways. -type PatchGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchGatewaysParamsPrefer defines parameters for PatchGateways. -type PatchGatewaysParamsPrefer string - -// PostGatewaysParams defines parameters for PostGateways. -type PostGatewaysParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// PostGatewaysParamsPrefer defines parameters for PostGateways. -type PostGatewaysParamsPrefer string - -// DeleteNetworksParams defines parameters for DeleteNetworks. -type DeleteNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. -type DeleteNetworksParamsPrefer string - -// GetNetworksParams defines parameters for GetNetworks. -type GetNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetNetworksParamsPrefer defines parameters for GetNetworks. -type GetNetworksParamsPrefer string - -// PatchNetworksParams defines parameters for PatchNetworks. -type PatchNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchNetworksParamsPrefer defines parameters for PatchNetworks. -type PatchNetworksParamsPrefer string - -// PostNetworksParams defines parameters for PostNetworks. -type PostNetworksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostNetworksParamsPrefer defines parameters for PostNetworks. -type PostNetworksParamsPrefer string - -// DeleteOrganizationsParams defines parameters for DeleteOrganizations. -type DeleteOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. -type DeleteOrganizationsParamsPrefer string - -// GetOrganizationsParams defines parameters for GetOrganizations. -type GetOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. -type GetOrganizationsParamsPrefer string - -// PatchOrganizationsParams defines parameters for PatchOrganizations. -type PatchOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. -type PatchOrganizationsParamsPrefer string - -// PostOrganizationsParams defines parameters for PostOrganizations. -type PostOrganizationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. -type PostOrganizationsParamsPrefer string - -// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParamsPrefer string - -// GetPortalAccountsParams defines parameters for GetPortalAccounts. -type GetPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. -type GetPortalAccountsParamsPrefer string - -// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParamsPrefer string - -// PostPortalAccountsParams defines parameters for PostPortalAccounts. -type PostPortalAccountsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. -type PostPortalAccountsParamsPrefer string - -// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParamsPrefer string - -// GetPortalApplicationsParams defines parameters for GetPortalApplications. -type GetPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. -type GetPortalApplicationsParamsPrefer string - -// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParamsPrefer string - -// PostPortalApplicationsParams defines parameters for PostPortalApplications. -type PostPortalApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. -type PostPortalApplicationsParamsPrefer string - -// DeletePortalPlansParams defines parameters for DeletePortalPlans. -type DeletePortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Prefer Preference - Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. -type DeletePortalPlansParamsPrefer string - -// GetPortalPlansParams defines parameters for GetPortalPlans. -type GetPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. -type GetPortalPlansParamsPrefer string - -// PatchPortalPlansParams defines parameters for PatchPortalPlans. -type PatchPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Prefer Preference - Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. -type PatchPortalPlansParamsPrefer string - -// PostPortalPlansParams defines parameters for PostPortalPlans. -type PostPortalPlansParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. -type PostPortalPlansParamsPrefer string - -// PostRpcMeJSONBody defines parameters for PostRpcMe. -type PostRpcMeJSONBody = map[string]interface{} - -// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} - -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} - -// PostRpcMeParams defines parameters for PostRpcMe. -type PostRpcMeParams struct { - // Prefer Preference - Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` -} - -// PostRpcMeParamsPrefer defines parameters for PostRpcMe. -type PostRpcMeParamsPrefer string - -// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParamsPrefer string - -// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParamsPrefer string - -// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParamsPrefer string - -// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParamsPrefer string - -// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParamsPrefer string - -// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParamsPrefer string - -// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParamsPrefer string - -// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParamsPrefer string - -// DeleteServicesParams defines parameters for DeleteServices. -type DeleteServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServicesParamsPrefer defines parameters for DeleteServices. -type DeleteServicesParamsPrefer string - -// GetServicesParams defines parameters for GetServices. -type GetServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServicesParamsPrefer defines parameters for GetServices. -type GetServicesParamsPrefer string - -// PatchServicesParams defines parameters for PatchServices. -type PatchServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServicesParamsPrefer defines parameters for PatchServices. -type PatchServicesParamsPrefer string - -// PostServicesParams defines parameters for PostServices. -type PostServicesParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServicesParamsPrefer defines parameters for PostServices. -type PostServicesParamsPrefer string - -// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. -type PatchApplicationsJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. -type PostApplicationsJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. -type PatchGatewaysJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - -// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. -type PostGatewaysJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - -// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. -type PatchNetworksJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. -type PostNetworksJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. -type PatchOrganizationsJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. -type PostOrganizationsJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. -type PatchPortalAccountsJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. -type PostPortalAccountsJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. -type PatchPortalApplicationsJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. -type PostPortalApplicationsJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. -type PatchPortalPlansJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - -// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. -type PostPortalPlansJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - -// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. -type PostRpcMeJSONRequestBody = PostRpcMeJSONBody - -// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody - -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody - -// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. -type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. -type PostServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. -type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. -type PostServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. -type PatchServicesJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services - -// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. -type PostServicesJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services From ea7a0b3108e5b6de0b8dd996c30a82f320dc392b Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 10:46:53 +0100 Subject: [PATCH 13/43] fix go sdk generation --- portal-db/api/openapi/openapi.json | 20 +- .../api/scripts/test-portal-app-creation.sh | 3 +- .../schema/003_postgrest_transactions.sql | 14 +- portal-db/sdk/go/client.go | 13038 ++++++++++++++++ portal-db/sdk/go/models.go | 2033 +++ 5 files changed, 15094 insertions(+), 14 deletions(-) create mode 100644 portal-db/sdk/go/client.go create mode 100644 portal-db/sdk/go/models.go diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index ce5d374ef..17b53f08f 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -2199,8 +2199,8 @@ "name": "p_secret_key_required", "required": false, "schema": { - "type": "boolean", - "format": "boolean" + "type": "string", + "format": "text" } } ], @@ -2267,8 +2267,8 @@ "type": "string" }, "p_secret_key_required": { - - "type": "boolean" + "format": "text", + "type": "string" } }, "required": [ @@ -2322,8 +2322,8 @@ "type": "string" }, "p_secret_key_required": { - - "type": "boolean" + "format": "text", + "type": "string" } }, "required": [ @@ -2377,8 +2377,8 @@ "type": "string" }, "p_secret_key_required": { - - "type": "boolean" + "format": "text", + "type": "string" } }, "required": [ @@ -2432,8 +2432,8 @@ "type": "string" }, "p_secret_key_required": { - - "type": "boolean" + "format": "text", + "type": "string" } }, "required": [ diff --git a/portal-db/api/scripts/test-portal-app-creation.sh b/portal-db/api/scripts/test-portal-app-creation.sh index 8b0b902c3..1875bc311 100755 --- a/portal-db/api/scripts/test-portal-app-creation.sh +++ b/portal-db/api/scripts/test-portal-app-creation.sh @@ -59,7 +59,8 @@ create_portal_app() { \"p_portal_user_id\": \"00000000-0000-0000-0000-000000000002\", \"p_portal_application_name\": \"$APP_NAME\", \"p_portal_application_description\": \"Test application created via automated test\", - \"p_emoji\": \"๐Ÿงช\" + \"p_emoji\": \"๐Ÿงช\", + \"p_secret_key_required\": \"false\" }") # Check if the response contains an error diff --git a/portal-db/schema/003_postgrest_transactions.sql b/portal-db/schema/003_postgrest_transactions.sql index fb14de2a5..1d11b617e 100644 --- a/portal-db/schema/003_postgrest_transactions.sql +++ b/portal-db/schema/003_postgrest_transactions.sql @@ -88,7 +88,7 @@ CREATE OR REPLACE FUNCTION public.create_portal_application( p_portal_application_user_limit_rps INT DEFAULT NULL, p_portal_application_description VARCHAR(255) DEFAULT NULL, p_favorite_service_ids VARCHAR[] DEFAULT NULL, - p_secret_key_required BOOLEAN DEFAULT false + p_secret_key_required TEXT DEFAULT 'false' ) RETURNS JSON AS $$ DECLARE v_new_app_id VARCHAR(36); @@ -96,12 +96,20 @@ DECLARE v_secret_key TEXT; v_secret_key_hash VARCHAR(255); v_user_is_account_member BOOLEAN := FALSE; + v_secret_key_required_bool BOOLEAN; v_result JSON; BEGIN -- ======================================================================== -- VALIDATION PHASE -- ======================================================================== + -- Convert text parameter to boolean for internal use + -- This avoids OpenAPI/SDK generation issues with boolean parameters + v_secret_key_required_bool := CASE + WHEN LOWER(p_secret_key_required) IN ('true', 't', '1', 'yes', 'y') THEN TRUE + ELSE FALSE + END; + -- Validate required parameters -- PostgreSQL will enforce NOT NULL constraints, but we provide better error messages IF p_portal_account_id IS NULL THEN @@ -189,7 +197,7 @@ BEGIN p_portal_application_description, p_favorite_service_ids, v_secret_key_hash, - p_secret_key_required, + v_secret_key_required_bool, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ); @@ -225,7 +233,7 @@ BEGIN 'portal_account_id', p_portal_account_id, 'portal_application_name', p_portal_application_name, 'secret_key', v_secret_key, - 'secret_key_required', p_secret_key_required, + 'secret_key_required', v_secret_key_required_bool, 'created_at', CURRENT_TIMESTAMP, 'message', 'Portal application created successfully', 'warning', 'Store the secret key securely - it cannot be retrieved again' diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go new file mode 100644 index 000000000..edbe4e2c0 --- /dev/null +++ b/portal-db/sdk/go/client.go @@ -0,0 +1,13038 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/oapi-codegen/runtime" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // Get request + Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApplications request + DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApplications request + GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApplicationsWithBody request with any body + PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApplicationsWithBody request with any body + PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteGateways request + DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGateways request + GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchGatewaysWithBody request with any body + PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostGatewaysWithBody request with any body + PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteNetworks request + DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNetworks request + GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchNetworksWithBody request with any body + PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostNetworksWithBody request with any body + PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOrganizations request + DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizations request + GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOrganizationsWithBody request with any body + PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationsWithBody request with any body + PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalAccounts request + DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalAccounts request + GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalAccountsWithBody request with any body + PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalAccountsWithBody request with any body + PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalApplications request + DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalApplications request + GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalApplicationsWithBody request with any body + PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalApplicationsWithBody request with any body + PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalPlans request + DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalPlans request + GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalPlansWithBody request with any body + PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalPlansWithBody request with any body + PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcCreatePortalApplication request + GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcCreatePortalApplicationWithBody request with any body + PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcMe request + GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcMeWithBody request with any body + PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceEndpoints request + DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceEndpoints request + GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceEndpointsWithBody request with any body + PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceEndpointsWithBody request with any body + PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceFallbacks request + DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceFallbacks request + GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceFallbacksWithBody request with any body + PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceFallbacksWithBody request with any body + PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServices request + DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServices request + GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServicesWithBody request with any body + PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServicesWithBody request with any body + PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteGatewaysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGatewaysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrganizationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcCreatePortalApplicationRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcMeRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetRequest generates requests for Get +func NewGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteApplicationsRequest generates requests for DeleteApplications +func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetApplicationsRequest generates requests for GetApplications +func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchApplicationsRequest calls the generic PatchApplications builder with application/json body +func NewPatchApplicationsRequest(server string, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json body +func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchApplicationsRequestWithBody generates requests for PatchApplications with any type of body +func NewPatchApplicationsRequestWithBody(server string, params *PatchApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostApplicationsRequest calls the generic PostApplications builder with application/json body +func NewPostApplicationsRequest(server string, params *PostApplicationsParams, body PostApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostApplications builder with application/vnd.pgrst.object+json body +func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostApplicationsRequestWithBody generates requests for PostApplications with any type of body +func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteGatewaysRequest generates requests for DeleteGateways +func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetGatewaysRequest generates requests for GetGateways +func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchGatewaysRequest calls the generic PatchGateways builder with application/json body +func NewPatchGatewaysRequest(server string, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json body +func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchGatewaysRequestWithBody generates requests for PatchGateways with any type of body +func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostGatewaysRequest calls the generic PostGateways builder with application/json body +func NewPostGatewaysRequest(server string, params *PostGatewaysParams, body PostGatewaysJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostGateways builder with application/vnd.pgrst.object+json body +func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostGateways builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostGatewaysRequestWithBody generates requests for PostGateways with any type of body +func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteNetworksRequest generates requests for DeleteNetworks +func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetNetworksRequest generates requests for GetNetworks +func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body +func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body +func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body +func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body +func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations +func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetOrganizationsRequest generates requests for GetOrganizations +func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body +func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body +func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body +func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body +func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts +func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalAccountsRequest generates requests for GetPortalAccounts +func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body +func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body +func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body +func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body +func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications +func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalApplicationsRequest generates requests for GetPortalApplications +func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body +func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body +func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body +func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body +func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalPlansRequest generates requests for DeletePortalPlans +func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalPlansRequest generates requests for GetPortalPlans +func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body +func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body +func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body +func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body +func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcCreatePortalApplicationRequest generates requests for GetRpcCreatePortalApplication +func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreatePortalApplicationParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/create_portal_application") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_account_id", runtime.ParamLocationQuery, params.PPortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_user_id", runtime.ParamLocationQuery, params.PPortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.PPortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_name", runtime.ParamLocationQuery, *params.PPortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PEmoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_emoji", runtime.ParamLocationQuery, *params.PEmoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_description", runtime.ParamLocationQuery, *params.PPortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PFavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_favorite_service_ids", runtime.ParamLocationQuery, *params.PFavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PSecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_secret_key_required", runtime.ParamLocationQuery, *params.PSecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcCreatePortalApplicationRequest calls the generic PostRpcCreatePortalApplication builder with application/json body +func NewPostRpcCreatePortalApplicationRequest(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json body +func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithBody generates requests for PostRpcCreatePortalApplication with any type of body +func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/create_portal_application") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcMeRequest generates requests for GetRpcMe +func NewGetRpcMeRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcMeRequest calls the generic PostRpcMe builder with application/json body +func NewPostRpcMeRequest(server string, params *PostRpcMeParams, body PostRpcMeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json body +func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcMeRequestWithBody generates requests for PostRpcMe with any type of body +func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints +func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints +func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body +func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body +func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body +func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body +func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks +func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks +func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body +func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body +func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body +func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body +func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServicesRequest generates requests for DeleteServices +func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServicesRequest generates requests for GetServices +func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServicesRequest calls the generic PatchServices builder with application/json body +func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body +func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServicesRequest calls the generic PostServices builder with application/json body +func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServicesRequestWithBody generates requests for PostServices with any type of body +func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) + + // DeleteApplicationsWithResponse request + DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) + + // GetApplicationsWithResponse request + GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) + + // PatchApplicationsWithBodyWithResponse request with any body + PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + // PostApplicationsWithBodyWithResponse request with any body + PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + // DeleteGatewaysWithResponse request + DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) + + // GetGatewaysWithResponse request + GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) + + // PatchGatewaysWithBodyWithResponse request with any body + PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + // PostGatewaysWithBodyWithResponse request with any body + PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + // DeleteNetworksWithResponse request + DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) + + // GetNetworksWithResponse request + GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) + + // PatchNetworksWithBodyWithResponse request with any body + PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + // PostNetworksWithBodyWithResponse request with any body + PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + // DeleteOrganizationsWithResponse request + DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) + + // GetOrganizationsWithResponse request + GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) + + // PatchOrganizationsWithBodyWithResponse request with any body + PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + // PostOrganizationsWithBodyWithResponse request with any body + PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + // DeletePortalAccountsWithResponse request + DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) + + // GetPortalAccountsWithResponse request + GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) + + // PatchPortalAccountsWithBodyWithResponse request with any body + PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + // PostPortalAccountsWithBodyWithResponse request with any body + PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + // DeletePortalApplicationsWithResponse request + DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) + + // GetPortalApplicationsWithResponse request + GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) + + // PatchPortalApplicationsWithBodyWithResponse request with any body + PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + // PostPortalApplicationsWithBodyWithResponse request with any body + PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + // DeletePortalPlansWithResponse request + DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) + + // GetPortalPlansWithResponse request + GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) + + // PatchPortalPlansWithBodyWithResponse request with any body + PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + // PostPortalPlansWithBodyWithResponse request with any body + PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + // GetRpcCreatePortalApplicationWithResponse request + GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) + + // PostRpcCreatePortalApplicationWithBodyWithResponse request with any body + PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + // GetRpcMeWithResponse request + GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) + + // PostRpcMeWithBodyWithResponse request with any body + PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + // DeleteServiceEndpointsWithResponse request + DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) + + // GetServiceEndpointsWithResponse request + GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) + + // PatchServiceEndpointsWithBodyWithResponse request with any body + PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + // PostServiceEndpointsWithBodyWithResponse request with any body + PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + // DeleteServiceFallbacksWithResponse request + DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) + + // GetServiceFallbacksWithResponse request + GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) + + // PatchServiceFallbacksWithBodyWithResponse request with any body + PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + // PostServiceFallbacksWithBodyWithResponse request with any body + PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + // DeleteServicesWithResponse request + DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) + + // GetServicesWithResponse request + GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) + + // PatchServicesWithBodyWithResponse request with any body + PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + // PostServicesWithBodyWithResponse request with any body + PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) +} + +type GetResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Applications + ApplicationvndPgrstObjectJSON200 *[]Applications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Applications +} + +// Status returns HTTPResponse.Status +func (r GetApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Gateways + ApplicationvndPgrstObjectJSON200 *[]Gateways + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Gateways +} + +// Status returns HTTPResponse.Status +func (r GetGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Networks + ApplicationvndPgrstObjectJSON200 *[]Networks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks +} + +// Status returns HTTPResponse.Status +func (r GetNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Organizations + ApplicationvndPgrstObjectJSON200 *[]Organizations + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts +} + +// Status returns HTTPResponse.Status +func (r GetPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications +} + +// Status returns HTTPResponse.Status +func (r GetPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans +} + +// Status returns HTTPResponse.Status +func (r GetPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcCreatePortalApplicationResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcCreatePortalApplicationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcCreatePortalApplicationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcCreatePortalApplicationResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcCreatePortalApplicationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcCreatePortalApplicationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcMeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcMeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints +} + +// Status returns HTTPResponse.Status +func (r GetServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks +} + +// Status returns HTTPResponse.Status +func (r GetServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Services + ApplicationvndPgrstObjectJSON200 *[]Services + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services +} + +// Status returns HTTPResponse.Status +func (r GetServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetResponse(rsp) +} + +// DeleteApplicationsWithResponse request returning *DeleteApplicationsResponse +func (c *ClientWithResponses) DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) { + rsp, err := c.DeleteApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApplicationsResponse(rsp) +} + +// GetApplicationsWithResponse request returning *GetApplicationsResponse +func (c *ClientWithResponses) GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) { + rsp, err := c.GetApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApplicationsResponse(rsp) +} + +// PatchApplicationsWithBodyWithResponse request with arbitrary body returning *PatchApplicationsResponse +func (c *ClientWithResponses) PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +// PostApplicationsWithBodyWithResponse request with arbitrary body returning *PostApplicationsResponse +func (c *ClientWithResponses) PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +// DeleteGatewaysWithResponse request returning *DeleteGatewaysResponse +func (c *ClientWithResponses) DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) { + rsp, err := c.DeleteGateways(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteGatewaysResponse(rsp) +} + +// GetGatewaysWithResponse request returning *GetGatewaysResponse +func (c *ClientWithResponses) GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) { + rsp, err := c.GetGateways(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGatewaysResponse(rsp) +} + +// PatchGatewaysWithBodyWithResponse request with arbitrary body returning *PatchGatewaysResponse +func (c *ClientWithResponses) PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGateways(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +// PostGatewaysWithBodyWithResponse request with arbitrary body returning *PostGatewaysResponse +func (c *ClientWithResponses) PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGateways(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +// DeleteNetworksWithResponse request returning *DeleteNetworksResponse +func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { + rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteNetworksResponse(rsp) +} + +// GetNetworksWithResponse request returning *GetNetworksResponse +func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { + rsp, err := c.GetNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworksResponse(rsp) +} + +// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse +func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse +func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse +func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { + rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrganizationsResponse(rsp) +} + +// GetOrganizationsWithResponse request returning *GetOrganizationsResponse +func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { + rsp, err := c.GetOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationsResponse(rsp) +} + +// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse +func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse +func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse +func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { + rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalAccountsResponse(rsp) +} + +// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse +func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { + rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalAccountsResponse(rsp) +} + +// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse +func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse +func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse +func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { + rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalApplicationsResponse(rsp) +} + +// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse +func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { + rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalApplicationsResponse(rsp) +} + +// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse +func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse +func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse +func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { + rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalPlansResponse(rsp) +} + +// GetPortalPlansWithResponse request returning *GetPortalPlansResponse +func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { + rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalPlansResponse(rsp) +} + +// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse +func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse +func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +// GetRpcCreatePortalApplicationWithResponse request returning *GetRpcCreatePortalApplicationResponse +func (c *ClientWithResponses) GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) { + rsp, err := c.GetRpcCreatePortalApplication(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcCreatePortalApplicationResponse(rsp) +} + +// PostRpcCreatePortalApplicationWithBodyWithResponse request with arbitrary body returning *PostRpcCreatePortalApplicationResponse +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplication(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +// GetRpcMeWithResponse request returning *GetRpcMeResponse +func (c *ClientWithResponses) GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) { + rsp, err := c.GetRpcMe(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcMeResponse(rsp) +} + +// PostRpcMeWithBodyWithResponse request with arbitrary body returning *PostRpcMeResponse +func (c *ClientWithResponses) PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMe(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse +func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { + rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceEndpointsResponse(rsp) +} + +// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse +func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { + rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceEndpointsResponse(rsp) +} + +// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse +func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse +func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse +func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { + rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceFallbacksResponse(rsp) +} + +// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse +func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { + rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceFallbacksResponse(rsp) +} + +// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse +func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse +func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +// DeleteServicesWithResponse request returning *DeleteServicesResponse +func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { + rsp, err := c.DeleteServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServicesResponse(rsp) +} + +// GetServicesWithResponse request returning *GetServicesResponse +func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { + rsp, err := c.GetServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServicesResponse(rsp) +} + +// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse +func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse +func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +// ParseGetResponse parses an HTTP response from a GetWithResponse call +func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteApplicationsResponse parses an HTTP response from a DeleteApplicationsWithResponse call +func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetApplicationsResponse parses an HTTP response from a GetApplicationsWithResponse call +func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchApplicationsResponse parses an HTTP response from a PatchApplicationsWithResponse call +func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostApplicationsResponse parses an HTTP response from a PostApplicationsWithResponse call +func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteGatewaysResponse parses an HTTP response from a DeleteGatewaysWithResponse call +func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetGatewaysResponse parses an HTTP response from a GetGatewaysWithResponse call +func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchGatewaysResponse parses an HTTP response from a PatchGatewaysWithResponse call +func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostGatewaysResponse parses an HTTP response from a PostGatewaysWithResponse call +func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call +func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call +func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call +func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call +func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call +func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call +func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call +func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call +func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call +func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call +func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call +func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call +func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call +func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call +func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call +func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call +func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call +func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call +func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call +func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call +func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcCreatePortalApplicationResponse parses an HTTP response from a GetRpcCreatePortalApplicationWithResponse call +func ParseGetRpcCreatePortalApplicationResponse(rsp *http.Response) (*GetRpcCreatePortalApplicationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcCreatePortalApplicationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcCreatePortalApplicationResponse parses an HTTP response from a PostRpcCreatePortalApplicationWithResponse call +func ParsePostRpcCreatePortalApplicationResponse(rsp *http.Response) (*PostRpcCreatePortalApplicationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcCreatePortalApplicationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcMeResponse parses an HTTP response from a GetRpcMeWithResponse call +func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcMeResponse parses an HTTP response from a PostRpcMeWithResponse call +func ParsePostRpcMeResponse(rsp *http.Response) (*PostRpcMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call +func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call +func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call +func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call +func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call +func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call +func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call +func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call +func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call +func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call +func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call +func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call +func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/+w9XW/ctpZ/hdAukBQ7sd30A7he5CFN27vd26aGk+w+NMFcWuLMsJYohaTs+Bb+7xfU", + "JyVSEiVSGsfRSxCPDs85Is+3eMi/PD+Okpggwpl3/peXQAojxBHN/gpxhLn4T4CYT3HCcUy8c+9X8TMm", + "ewBJAC7gHhOYPdl4WDz+mCJ65208AiPknRdINh7zDyiCAhu/S8QDxikme+/+fuPFux1D1pQKLAOkaICo", + "Sul38bOA6UCdjerHnFC0Q/RVnBLNm1xkDxHxUUnhgGCOsyCRQzRoIJJG3vkfni9wviAxQd6HTSflC7F2", + "zDHpTCDYC4bJPkTP4qs/kc97mYiZ67eniKeUvKAooYghwksRKH6PMMERDOsfsnkSf7E4TAXsC7wnMUXP", + "gjQJsQ85Ys3HEaL7xtOe97vMaDyEN9QySSHZo9F61Gb1MsPSL+0ZpXdkgn3QUnuWoZJJBmgH05B75x7m", + "KBJLpmEivv0ZhxzRE5jkq4djwuQ/tjAIKGIatfghjP1r/wAxAQUMiHeAHxCQhneYAx0BmfddTCMoWPcP", + "kEKfIwpuIL3L7cuk10govoEcba/R3faAPgkiQ4y1h7hn0KcIchRsIe/iR4LQkuc4QozDKAG3mB+A+BP8", + "K9dfYy72kKNbeCevtI6VNpj76SCI38b0eouDLh4kCPfkGaI32Ec95CWIGchzeI22MCr9n5YBGUbLwhXe", + "4+zZSLoBInHUTzYHcf/iaRIMaIEE4VILCok+oh5WHGh00NTaFkM7LO0sWquwbWhdu8DdMrW8GalIt3W4", + "uYYvs9+zdYuvEWEgAw/A1Z3BQjpS/Rary6p9RfxoKl+s/DGEJKZ7SPC/ju36m2wEKEQ1G01xfRPvOMgB", + "QEWsQzolPPMxK//Vs3BtMC1DmHC0z6LoifRzYu05ew0jVBpmGbwzLW5jnEHUjqZsSUw5DLfQz/JvdnKF", + "wxCT/TYfo2elAeNkMtpcHE3z2ow0dW9BrWozsveT8o8etWpBzbI2ggYiHPMQRWiQmxbkLBwJO0FJ/Uul", + "9zqm9MCz8LW8LWxz0Py74KFpDd8R/DFFAAdipXYYUbCLaWYb88GgGNxhHVUKs0xli0zKEN1WlVsDvqQB", + "801vTWSbSdkNDEezV4/U8pmkVyH2T5IQEhnSDdM0YeP5FYPcT2n2gn0+SIGbRewEUIK2LL2qVEarRG8y", + "OCDDtTWqcJqdmYOW0Cwv9WBijUyKTGy2Cuh0Yh5EuU/HzNGjD5kZFMV/4i4+8oezrcoO3sQUc7Stq3ud", + "pkoLa8bZHx8m8Kb1sUdwlTqepEp5w2D1M9gxakluh2exCbwkb32Wqgt8Sf7MgyP9IAfe3JhD40BpYLTr", + "YMn8BQyCpu6BjqeaIZ8inpdsITuoccr/QHZAAcjhwDW6y0ITCQeAKT+IuKX302CbzmzSLRGi6GOKKer5", + "7qOC6kuwcRwiSCZwc+zASQgyy8VZlql+VddD2wuexAyFHDW1oSl1l5AjkD0HmACxOohxBhJEhSTGJOjK", + "LTXInTKeMrhH244dQL/BTzhKI5ABARiG8S0KsnXDJMuPJZPSyb1MYS7Wh21o5wDHZrPg7yGkcHpWRkRB", + "+jFOWCwDU0SCJMZHrXeqrJT/6wnBZBALoe6h3Sc2TaA+CW5DjmNm+a0GKg9H8zglKzsYhlfQv34AIlqz", + "Uv5vm9KwOwuUYJyuTs1H+xcDUZFBHaiOysvy0lrzcGxpZSfQ5/im03IUTy2iworQFeKw8/OYeOaCiB9H", + "mOy3LO52VjKII5JJytE2JZizbYLolqIQ3qnR0auYZdFcMQBkA7JsAkH/APJRmy6etTTs9eH4VuqINbuK", + "gwOkQW1oEIFXYXfapAd2IUrL796oSH9MYYj5nfEkdMK7mIfSTgZxBDHRpEf/B0McgOJx8fUNM1CM60zB", + "m1gdFTgVrhf3JzXpvjpbA2Ye8vEtQXRow60e2DFDN/st9rt9QPVcb03QJ25KaWEHzlCIfE3mnbOFyR68", + "isM0yqRbP/nZ+L49/OI983rDD3GAUbaOck1H/O3HhKN8L6D06PRPlk95jfw/Kdp5595/nNb9RKf5U3ba", + "QCrIyqhuSHCS7CnjJ3lzyX/Njfu/SRqG7EX2VTHJ7d5EUkJ8Tn12MxnF/aa1us3nm3LDqbulqBA6XoZx", + "eCcvQYPM+OmXhitTXz/blM7X3bRXCB1P+zi8k6e9QWb8tEvDlWmvn20am33czX0Tq+MFmIB88iqotMYv", + "RRuHsh4tgE3ry6y7ZWnjdbwwk9BPXhodtfGLo2JRlkcB2Wi+pLlfpBkd+GQS1otl7871mDoXreXc5Wq8", + "6xXLkc6zVCNw265RTWry4pQoulaleL7xlAqzszVRMTtemIkEJq+Ont74JdLhUdZJA7RRasbuF6vGPNNi", + "jSRgvVhNetMXS8bTuVgSULVYztdorqVZaEUsF6Jv/nPUxQBdXt86/IIUnZkSVFZsS2jsI8Yw2edVawb4", + "gcbp/pB95C9id2/jJTROEOVqEcGy/f49eU9exxydvydvD5gBzAAEFxRHkN6Bf6C7k/fp2dk3fnJ9mv0H", + "eZv+mlIEP/2KyJ4fvPPvzpSyy8Yb6Lg3xf39txrczfJ7fbrBq3eXlz+9frt9+8tvP715+/K3C/klzGtG", + "G2+wB1eZyZ9jivCeiJkEPAb/7Grn/Wcxz7trwOFViF48KSGfAD8rQ1W/lEOeOFqRZqV85PtouiXVVymB", + "6lepoSe8xbfPNW/RrBiPfAtN3Vl9ixKofosa2tlbtLqDOzt3yw9T1ZiqTdeU/tffaeg3S7DONaioh+Yb", + "6f7oOOND048u1/olca3PZylOzWnV8/QmuIAAmORvkHVLED9MA2GEs9nMjlUpCIEAcYhDptjg41ubwY7/", + "pY17T7O/lWF/JCbKTev/47YJGu1vHWvQOHJgwBrIZeZWz1SaiPRUTHCtRSU4eHoR+9eIgwhiQhDfAI4Y", + "z/6DuH/ylWILRgmoGwXUiFhrKgfmRqkFt7dYRAkkGDEQU+CnjMcRomBP4zQRMSrkwIcEXCEAOYf+AQVC", + "2S7yps2XZfFscZs55bSCSYQ03bVull3ZciKptd3xAsYm+G9HtwJqU7L66jqZ1pTSW9uq05DjZxwRSHjZ", + "W8xy7rIyVeb5i2bJbIv1npbT15Tk9kkFppP7/OwYiUtTLaZFI8oRAMav/N13HfjURn47nJ2t+FZ+e7yq", + "t0OQ3kNK1GCkAV5HJK1xT0Yaj45u/FLW9ohsKSRBHG3TFAdPhZOb1qs/Y9T5zfea9entzp8yNR0NYuVZ", + "kkEWhkUx4Qdv490hSIUtGtnAsPEGO+HHsN5odxgpnb09C6p0yuC1cLbHuQuaZ+iBt7MyM7vCjaftTHcX", + "F+o6gRUx6vOuvZXOl3KFs3BsZd9S004UfpcfEKYgviWAVp1auR9miHNM9kcPIyehqBrWjZMvnW3raj0f", + "2GSZn+eq7kirKEBK4V2PV5hiQLrPfek0IuUQxY7UY5849hLdTel2VqGzjXyMiz2G29T0lltZ7MGe8FEu", + "ebhveya33NtvbfQKc/RD28loR0NzJaE7GDJUjSt3mi+e/XUdsqDaqh4vVW36aLmnG4hDYYOaoUKe/Inp", + "HyphdDdAm8m1q5Zlc2rO+ownkVxAV8cEv7MV3zbeULuvOfIzQw3pD9e02226tKEEAgKN1EpV94EsHIK1", + "OoHnL64p7b/13RAR4j/8/NbbeH7MoljYhMuf3oi///fN76+fXV688jbe/7954228vfhDI8oDzcCP5fvl", + "sn6i1Qlez2CfNjT2M7U6P4pH4N3lr7kKlHMGbg+IgKQQskqhwA7icHnVaHcg2wYF2j7i+RVuFfnxIt/R", + "yS1/IG9IR48mmH4Uq3RgR+MoCwmKj2OvuzYnVW3Qw4Fl2ck8DNlqRzYa4LSZ2EimP4fKRGeH7vCcPo4P", + "8X0NusNzYN9R66x4M8qCzhj5tntmzUtef+vBprTAWu1NkftYB9pTj2XUG7a87C1uSZtq0AU29Cn/8PVj", + "7OuuJ4sZ34uIFfwY+2kkXX+VBRDegfOEnZ+eJgKOIsZPYro/ReT05uvnJ2enMMEnBx6F+Re2XZyJJuZh", + "cQEECSANQB7ngmJ/7ca7QZTl1AWOk+fgKfwWnZ3tdl9ln9QSRGCCvXPvm5OzkzPhQiA/ZKyfin/2+VV1", + "wqtkrP4SeOfe37Ob5yhiSUxY7mqen51pNnr9I9+bm0ZC3sUPCSIvL34BEhh4mulkUMzHV2KN4J6J1fiF", + "cBqzBPkZug8C1ala8hZWWGXxx+x3uQSevVp9498f+o3HNcjpiAu37jdTsbV32UzHJMmuBRJ5i48tmnxr", + "0HQsfTuUp2OVPOd0JFJ0MR2JZNsMkDTu5Lv/oOjftzrPA14VPQgtPbTdBF+qaEMdP9xvOu3FqomrJj4W", + "TSzOmzCAzK9SNeEru4XSFDC7P9KEfH5JrAFkXpM2tkL5xa8aI3Q2qu+piq/Nz5Foh97jm6IWItrbMeWG", + "B307lQvcSq+ViOQ23vOz7zUxLaQcw3BxT5NA7h9UX3Mhfl69zeptHnHcVx5kdNel5o2zjhRlf5CBY1Jc", + "pt3S5pjZhY7mvlq603uOWf5aU+7MhWmhKRbZc7Mnqy9z/nsJOd16dl6YOkpz9Pd12qCYYJ5095VOQ9DV", + "mDUN21RzpLvc80gp6PQmwFLOK6Huyz9XeV7leU3kjprIyafOLZLE2RG0T+B66Vskbz143Sduju1zX9a2", + "2ujVRs+Q/sjq8vAClu68Z7I6LJfz9Ezt6HzH6byKZKfZct6X7LwuIacbHt1l9QtH1LaN9OU0VvPWF08f", + "b8rWoG3JoE0+s3aRoM2OoH3Q1kvfImjrwesuaJvFBPSFbA/Kco50XvKKPDSz2x0VTJ7x5aKCnok1jgpm", + "mFURE2iOWukLDH5vgE+X8d5jB8aF0T2oso1qFsikHa0WWKbmB00sxytMOjpupxTApsT1hVSrsH0ewrYG", + "oEsGoMoh/YtEoQ6o2oeiw0xYxKNDyN0FpbMb1L4AdTWqn60HHxl1KgL9kGOA7vjeTmCXC/KHpts40p95", + "rkXUrz2Mri/uz9HLJw9MNBuDB7KM07A2Ois71MFb3cpuhU09OskKnf5AORfvqzmtbB609QEKM+GnCbND", + "3ThK0QpTx2FhVjhb5x5a42qdeWiFb6rjbeOZ6noV7Tta+mxxrmdpwtvmui9pXi31aqlXS71a6i/EUq+1", + "pyVrT5obCBepPjmha19/MmHDogI1jN5dDWqmqKSv8rRGJmtkskYma2Ty5eaQIyuKGn/w8PLQ7sKtpb1f", + "rnI7PM/GtdtZJlmu2I467aVYATe9vxoOTvTH4U5SMh1aS7s0wOl0Zycjzg9Tn4M/W99pjN7Sh5rTmexL", + "B0jImmmNX3uuvTXW9onbLhFWB3ZZI7X1uC46w3W4jle9nefOiLatNz00aDXoq0FfDfpq0L8wg74WeY9R", + "5D3GMVPOaLsr9s546JQZCXdF3+MEMwY14TWgWQOaNaBZA5ovOEOdWLN0d5LZkZzDUPn48zjrzGw5jMvI", + "x1gLqcosXVA2XF6+yICtvbb+jtdJiqlHZW2DC7Tte8vcobLzchLO1iVultjUG+WWrsGNvxivJeq5QA9X", + "1lZZXmV5LT88iPJDrrIL1x0siDorOHTzYF9p6MLtsMTg0FYPFw5We73a6xmzq0pdHkjwMpQsTVOHxbOk", + "rmk1T4+czalIemjin+Y51lbNjKQrnzRXqUGOGEgZoiBC0RWi7IATUNxOXCRo4ArtYoryLA7H5AS8J7lo", + "shxMulO7OMFNOuVNQOwREcvduI77pLg+bZcSPz8YjgH0KYkZCsANhqC+VwsycPH7m7dg4DU3akh8mfj5", + "9CuZuCpiWEzJxxTRO2/j5XeteclWrZLKt4txmqKN5Mh671BTrikboJnV9JYkqNRt3VPKC7mLvIFU2dXS", + "675ociIZ+TJtDb2B+7anEhUeas73k02G+3XT1oHNyGS3ORoT0lVytXT0lxZ25Q0Dd+PlxocBWJW8JFOZ", + "Vb1gGALIWOzjzDxe/vDyFUCEU4yEDQUQMEz2IQKQxxH2AaeQMOjnVljyCU9p4n8Fum2j7Hq/KCcgEIzx", + "Ambhg/iB6QII4zxSFyPMJSfvyaNb5OadyKVfGWmWNl0GaNjumN8iqwshJvA5YJndYDS6YdYMleR9zZzS", + "xty9jvCqGyP/OZrDMjSbMFc6R2Tgf5p32urjUoU9zXW2o2tPq6FaDdVqqFZD9QANVW+9erVbq91a7dZq", + "t5a3W/pvXKs9Wu3Rao9We7S0Pbpvfz64/9wrmeUHr1x0u3ZDXSb+b8gb8a5NBiI08LmyxH+k+qF1Xu86", + "3jb1g07lU7NmQjpK045IkMTY6HTYN/mQn6oR03dkKNRPyv+NbrJQUU29GbyHqfEbRVRkU/ehq5iO2Cdd", + "fZIvuQFiavLP8Qj6B1BwK1krVdL6dmiuQvZZCtm6eXLJzZOqSi21g9IRZfttlGaMWOylNCEwx4ZKW8Pa", + "t51yNa6PxYOP3JKnFeYHEQd0Zw/WwrrcjkeT6Z2w7dFubuUofwfD8Ar61+ZR/s/VCHsbUVFXfpms4SpK", + "e0wVUykNbXHZmooa0/GC/VIEwLvLX3PpK7hj4PaACEgoFpCVmDKwgzjUSGUtfQaR/yp4n6XgrQnAMRKA", + "WrOWTgAsKbtLAPoZcZAA9BFwlwDMZGwNsoHV4D4WTz8xam0I+MOLFwYzhOkCvHyG0DfXxhnCLBMtpQvm", + "WYIDm2Gt1zWC8QcpVSgEYMrRNiWYs22C6JaiMPtYbcNQEEcQE2aJJb4liG5hEFDEpuIad8m8BgH0Ob6Z", + "OrtXiMPpC4PJfsvisS21FYaPKQwxv6s9ESIiu546EQdIA1e42M1+i/3Jbzb1lKR6cu181zGTU+1F+ZUZ", + "3NE4yrbeFBfmv87FXzWBRinpauVWK7daudXKrZWQB1sJWbwAcuy6x1zljnmrHE69tkFtY/Xcq+dePffq", + "uRcuqdlW0tyayaH62WdQN7MqlzmczQwxojflPKU09M69A+fJ+elpGPswPMSMn39zdnbm3X+4/3cAAAD/", + "/5yitW57IQEA", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %w", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + res := make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + resolvePath := PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + pathToFile := url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go new file mode 100644 index 000000000..80f774695 --- /dev/null +++ b/portal-db/sdk/go/models.go @@ -0,0 +1,2033 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +// Defines values for PortalAccountsPortalAccountUserLimitInterval. +const ( + PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" + PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" + PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" +) + +// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. +const ( + PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" + PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" + PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" +) + +// Defines values for PortalPlansPlanUsageLimitInterval. +const ( + Day PortalPlansPlanUsageLimitInterval = "day" + Month PortalPlansPlanUsageLimitInterval = "month" + Year PortalPlansPlanUsageLimitInterval = "year" +) + +// Defines values for ServiceEndpointsEndpointType. +const ( + CometBFT ServiceEndpointsEndpointType = "cometBFT" + Cosmos ServiceEndpointsEndpointType = "cosmos" + GRPC ServiceEndpointsEndpointType = "gRPC" + JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" + REST ServiceEndpointsEndpointType = "REST" + WSS ServiceEndpointsEndpointType = "WSS" +) + +// Defines values for PreferCount. +const ( + PreferCountCountNone PreferCount = "count=none" +) + +// Defines values for PreferParams. +const ( + PreferParamsParamsSingleObject PreferParams = "params=single-object" +) + +// Defines values for PreferPost. +const ( + PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" + PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" + PreferPostReturnMinimal PreferPost = "return=minimal" + PreferPostReturnNone PreferPost = "return=none" + PreferPostReturnRepresentation PreferPost = "return=representation" +) + +// Defines values for PreferReturn. +const ( + PreferReturnReturnMinimal PreferReturn = "return=minimal" + PreferReturnReturnNone PreferReturn = "return=none" + PreferReturnReturnRepresentation PreferReturn = "return=representation" +) + +// Defines values for DeleteApplicationsParamsPrefer. +const ( + DeleteApplicationsParamsPreferReturnMinimal DeleteApplicationsParamsPrefer = "return=minimal" + DeleteApplicationsParamsPreferReturnNone DeleteApplicationsParamsPrefer = "return=none" + DeleteApplicationsParamsPreferReturnRepresentation DeleteApplicationsParamsPrefer = "return=representation" +) + +// Defines values for GetApplicationsParamsPrefer. +const ( + GetApplicationsParamsPreferCountNone GetApplicationsParamsPrefer = "count=none" +) + +// Defines values for PatchApplicationsParamsPrefer. +const ( + PatchApplicationsParamsPreferReturnMinimal PatchApplicationsParamsPrefer = "return=minimal" + PatchApplicationsParamsPreferReturnNone PatchApplicationsParamsPrefer = "return=none" + PatchApplicationsParamsPreferReturnRepresentation PatchApplicationsParamsPrefer = "return=representation" +) + +// Defines values for PostApplicationsParamsPrefer. +const ( + PostApplicationsParamsPreferResolutionIgnoreDuplicates PostApplicationsParamsPrefer = "resolution=ignore-duplicates" + PostApplicationsParamsPreferResolutionMergeDuplicates PostApplicationsParamsPrefer = "resolution=merge-duplicates" + PostApplicationsParamsPreferReturnMinimal PostApplicationsParamsPrefer = "return=minimal" + PostApplicationsParamsPreferReturnNone PostApplicationsParamsPrefer = "return=none" + PostApplicationsParamsPreferReturnRepresentation PostApplicationsParamsPrefer = "return=representation" +) + +// Defines values for DeleteGatewaysParamsPrefer. +const ( + DeleteGatewaysParamsPreferReturnMinimal DeleteGatewaysParamsPrefer = "return=minimal" + DeleteGatewaysParamsPreferReturnNone DeleteGatewaysParamsPrefer = "return=none" + DeleteGatewaysParamsPreferReturnRepresentation DeleteGatewaysParamsPrefer = "return=representation" +) + +// Defines values for GetGatewaysParamsPrefer. +const ( + GetGatewaysParamsPreferCountNone GetGatewaysParamsPrefer = "count=none" +) + +// Defines values for PatchGatewaysParamsPrefer. +const ( + PatchGatewaysParamsPreferReturnMinimal PatchGatewaysParamsPrefer = "return=minimal" + PatchGatewaysParamsPreferReturnNone PatchGatewaysParamsPrefer = "return=none" + PatchGatewaysParamsPreferReturnRepresentation PatchGatewaysParamsPrefer = "return=representation" +) + +// Defines values for PostGatewaysParamsPrefer. +const ( + PostGatewaysParamsPreferResolutionIgnoreDuplicates PostGatewaysParamsPrefer = "resolution=ignore-duplicates" + PostGatewaysParamsPreferResolutionMergeDuplicates PostGatewaysParamsPrefer = "resolution=merge-duplicates" + PostGatewaysParamsPreferReturnMinimal PostGatewaysParamsPrefer = "return=minimal" + PostGatewaysParamsPreferReturnNone PostGatewaysParamsPrefer = "return=none" + PostGatewaysParamsPreferReturnRepresentation PostGatewaysParamsPrefer = "return=representation" +) + +// Defines values for DeleteNetworksParamsPrefer. +const ( + DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" + DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" + DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" +) + +// Defines values for GetNetworksParamsPrefer. +const ( + GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" +) + +// Defines values for PatchNetworksParamsPrefer. +const ( + PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" + PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" + PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" +) + +// Defines values for PostNetworksParamsPrefer. +const ( + PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" + PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" + PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" + PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" + PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" +) + +// Defines values for DeleteOrganizationsParamsPrefer. +const ( + DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" + DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" + DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for GetOrganizationsParamsPrefer. +const ( + GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" +) + +// Defines values for PatchOrganizationsParamsPrefer. +const ( + PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" + PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" + PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for PostOrganizationsParamsPrefer. +const ( + PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" + PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" + PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" + PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" + PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalAccountsParamsPrefer. +const ( + DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" + DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" + DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalAccountsParamsPrefer. +const ( + GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalAccountsParamsPrefer. +const ( + PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" + PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" + PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalAccountsParamsPrefer. +const ( + PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" + PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" + PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" + PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" + PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalApplicationsParamsPrefer. +const ( + DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" + DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" + DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalApplicationsParamsPrefer. +const ( + GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalApplicationsParamsPrefer. +const ( + PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" + PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" + PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalApplicationsParamsPrefer. +const ( + PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" + PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" + PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" + PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" + PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalPlansParamsPrefer. +const ( + DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" + DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" + DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" +) + +// Defines values for GetPortalPlansParamsPrefer. +const ( + GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" +) + +// Defines values for PatchPortalPlansParamsPrefer. +const ( + PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" + PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" + PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostPortalPlansParamsPrefer. +const ( + PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" + PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" + PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" + PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" + PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostRpcCreatePortalApplicationParamsPrefer. +const ( + PostRpcCreatePortalApplicationParamsPreferParamsSingleObject PostRpcCreatePortalApplicationParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcMeParamsPrefer. +const ( + ParamsSingleObject PostRpcMeParamsPrefer = "params=single-object" +) + +// Defines values for DeleteServiceEndpointsParamsPrefer. +const ( + DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" + DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" + DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for GetServiceEndpointsParamsPrefer. +const ( + GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" +) + +// Defines values for PatchServiceEndpointsParamsPrefer. +const ( + PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" + PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" + PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for PostServiceEndpointsParamsPrefer. +const ( + PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" + PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" + PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" + PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" + PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for DeleteServiceFallbacksParamsPrefer. +const ( + DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" + DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" + DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for GetServiceFallbacksParamsPrefer. +const ( + GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" +) + +// Defines values for PatchServiceFallbacksParamsPrefer. +const ( + PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" + PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" + PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for PostServiceFallbacksParamsPrefer. +const ( + PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" + PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" + PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" + PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" + PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for DeleteServicesParamsPrefer. +const ( + DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" + DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" + DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" +) + +// Defines values for GetServicesParamsPrefer. +const ( + CountNone GetServicesParamsPrefer = "count=none" +) + +// Defines values for PatchServicesParamsPrefer. +const ( + PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" + PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" + PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" +) + +// Defines values for PostServicesParamsPrefer. +const ( + PostServicesParamsPreferResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" + PostServicesParamsPreferResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" + PostServicesParamsPreferReturnMinimal PostServicesParamsPrefer = "return=minimal" + PostServicesParamsPreferReturnNone PostServicesParamsPrefer = "return=none" + PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" +) + +// Applications Onchain applications for processing relays through the network +type Applications struct { + // ApplicationAddress Blockchain address of the application + // + // Note: + // This is a Primary Key. + ApplicationAddress string `json:"application_address"` + ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Note: + // This is a Foreign Key to `gateways.gateway_address`. + GatewayAddress string `json:"gateway_address"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + StakeAmount *int `json:"stake_amount,omitempty"` + StakeDenom *string `json:"stake_denom,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Gateways Onchain gateway information including stake and network details +type Gateways struct { + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Blockchain address of the gateway + // + // Note: + // This is a Primary Key. + GatewayAddress string `json:"gateway_address"` + GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount int `json:"stake_amount"` + StakeDenom string `json:"stake_denom"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) +type Networks struct { + // NetworkId Note: + // This is a Primary Key. + NetworkId string `json:"network_id"` +} + +// Organizations Companies or customer groups that can be attached to Portal Accounts +type Organizations struct { + CreatedAt *string `json:"created_at,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *string `json:"deleted_at,omitempty"` + + // OrganizationId Note: + // This is a Primary Key. + OrganizationId int `json:"organization_id"` + + // OrganizationName Name of the organization + OrganizationName string `json:"organization_name"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalAccounts Multi-tenant accounts with plans and billing integration +type PortalAccounts struct { + BillingType *string `json:"billing_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + GcpAccountId *string `json:"gcp_account_id,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + InternalAccountName *string `json:"internal_account_name,omitempty"` + + // OrganizationId Note: + // This is a Foreign Key to `organizations.organization_id`. + OrganizationId *int `json:"organization_id,omitempty"` + + // PortalAccountId Unique identifier for the portal account + // + // Note: + // This is a Primary Key. + PortalAccountId string `json:"portal_account_id"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType string `json:"portal_plan_type"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + +// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. +type PortalAccountsPortalAccountUserLimitInterval string + +// PortalApplications Applications created within portal accounts with their own rate limits and settings +type PortalApplications struct { + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + Emoji *string `json:"emoji,omitempty"` + FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId string `json:"portal_account_id"` + PortalApplicationDescription *string `json:"portal_application_description,omitempty"` + + // PortalApplicationId Note: + // This is a Primary Key. + PortalApplicationId string `json:"portal_application_id"` + PortalApplicationName *string `json:"portal_application_name,omitempty"` + PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *string `json:"secret_key_hash,omitempty"` + SecretKeyRequired *bool `json:"secret_key_required,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. +type PortalApplicationsPortalApplicationUserLimitInterval string + +// PortalPlans Available subscription plans for Portal Accounts +type PortalPlans struct { + PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` + + // PortalPlanType Note: + // This is a Primary Key. + PortalPlanType string `json:"portal_plan_type"` + PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` +} + +// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. +type PortalPlansPlanUsageLimitInterval string + +// ServiceEndpoints Available endpoint types for each service +type ServiceEndpoints struct { + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId Note: + // This is a Primary Key. + EndpointId int `json:"endpoint_id"` + EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. +type ServiceEndpointsEndpointType string + +// ServiceFallbacks Fallback URLs for services when primary endpoints fail +type ServiceFallbacks struct { + CreatedAt *string `json:"created_at,omitempty"` + FallbackUrl string `json:"fallback_url"` + + // ServiceFallbackId Note: + // This is a Primary Key. + ServiceFallbackId int `json:"service_fallback_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Services Supported blockchain services from the Pocket Network +type Services struct { + Active *bool `json:"active,omitempty"` + Beta *bool `json:"beta,omitempty"` + ComingSoon *bool `json:"coming_soon,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId *string `json:"network_id,omitempty"` + QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains []string `json:"service_domains"` + + // ServiceId Note: + // This is a Primary Key. + ServiceId string `json:"service_id"` + ServiceName string `json:"service_name"` + ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` + SvgIcon *string `json:"svg_icon,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Limit defines model for limit. +type Limit = string + +// Offset defines model for offset. +type Offset = string + +// Order defines model for order. +type Order = string + +// PreferCount defines model for preferCount. +type PreferCount string + +// PreferParams defines model for preferParams. +type PreferParams string + +// PreferPost defines model for preferPost. +type PreferPost string + +// PreferReturn defines model for preferReturn. +type PreferReturn string + +// Range defines model for range. +type Range = string + +// RangeUnit defines model for rangeUnit. +type RangeUnit = string + +// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. +type RowFilterApplicationsApplicationAddress = string + +// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. +type RowFilterApplicationsApplicationPrivateKeyHex = string + +// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. +type RowFilterApplicationsCreatedAt = string + +// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. +type RowFilterApplicationsGatewayAddress = string + +// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. +type RowFilterApplicationsNetworkId = string + +// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. +type RowFilterApplicationsServiceId = string + +// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. +type RowFilterApplicationsStakeAmount = string + +// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. +type RowFilterApplicationsStakeDenom = string + +// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. +type RowFilterApplicationsUpdatedAt = string + +// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. +type RowFilterGatewaysCreatedAt = string + +// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. +type RowFilterGatewaysGatewayAddress = string + +// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. +type RowFilterGatewaysGatewayPrivateKeyHex = string + +// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. +type RowFilterGatewaysNetworkId = string + +// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. +type RowFilterGatewaysStakeAmount = string + +// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. +type RowFilterGatewaysStakeDenom = string + +// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. +type RowFilterGatewaysUpdatedAt = string + +// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. +type RowFilterNetworksNetworkId = string + +// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. +type RowFilterOrganizationsCreatedAt = string + +// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. +type RowFilterOrganizationsDeletedAt = string + +// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. +type RowFilterOrganizationsOrganizationId = string + +// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. +type RowFilterOrganizationsOrganizationName = string + +// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. +type RowFilterOrganizationsUpdatedAt = string + +// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. +type RowFilterPortalAccountsBillingType = string + +// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. +type RowFilterPortalAccountsCreatedAt = string + +// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. +type RowFilterPortalAccountsDeletedAt = string + +// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. +type RowFilterPortalAccountsGcpAccountId = string + +// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. +type RowFilterPortalAccountsGcpEntitlementId = string + +// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. +type RowFilterPortalAccountsInternalAccountName = string + +// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. +type RowFilterPortalAccountsOrganizationId = string + +// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. +type RowFilterPortalAccountsPortalAccountId = string + +// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. +type RowFilterPortalAccountsPortalAccountUserLimit = string + +// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. +type RowFilterPortalAccountsPortalAccountUserLimitInterval = string + +// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. +type RowFilterPortalAccountsPortalAccountUserLimitRps = string + +// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. +type RowFilterPortalAccountsPortalPlanType = string + +// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. +type RowFilterPortalAccountsStripeSubscriptionId = string + +// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. +type RowFilterPortalAccountsUpdatedAt = string + +// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. +type RowFilterPortalAccountsUserAccountName = string + +// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. +type RowFilterPortalApplicationsCreatedAt = string + +// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. +type RowFilterPortalApplicationsDeletedAt = string + +// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. +type RowFilterPortalApplicationsEmoji = string + +// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. +type RowFilterPortalApplicationsFavoriteServiceIds = string + +// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. +type RowFilterPortalApplicationsPortalAccountId = string + +// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. +type RowFilterPortalApplicationsPortalApplicationDescription = string + +// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. +type RowFilterPortalApplicationsPortalApplicationId = string + +// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. +type RowFilterPortalApplicationsPortalApplicationName = string + +// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. +type RowFilterPortalApplicationsPortalApplicationUserLimit = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. +type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. +type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string + +// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. +type RowFilterPortalApplicationsSecretKeyHash = string + +// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. +type RowFilterPortalApplicationsSecretKeyRequired = string + +// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. +type RowFilterPortalApplicationsUpdatedAt = string + +// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. +type RowFilterPortalPlansPlanApplicationLimit = string + +// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. +type RowFilterPortalPlansPlanRateLimitRps = string + +// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. +type RowFilterPortalPlansPlanUsageLimit = string + +// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. +type RowFilterPortalPlansPlanUsageLimitInterval = string + +// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. +type RowFilterPortalPlansPortalPlanType = string + +// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. +type RowFilterPortalPlansPortalPlanTypeDescription = string + +// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. +type RowFilterServiceEndpointsCreatedAt = string + +// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. +type RowFilterServiceEndpointsEndpointId = string + +// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. +type RowFilterServiceEndpointsEndpointType = string + +// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. +type RowFilterServiceEndpointsServiceId = string + +// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. +type RowFilterServiceEndpointsUpdatedAt = string + +// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. +type RowFilterServiceFallbacksCreatedAt = string + +// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. +type RowFilterServiceFallbacksFallbackUrl = string + +// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. +type RowFilterServiceFallbacksServiceFallbackId = string + +// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. +type RowFilterServiceFallbacksServiceId = string + +// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. +type RowFilterServiceFallbacksUpdatedAt = string + +// RowFilterServicesActive defines model for rowFilter.services.active. +type RowFilterServicesActive = string + +// RowFilterServicesBeta defines model for rowFilter.services.beta. +type RowFilterServicesBeta = string + +// RowFilterServicesComingSoon defines model for rowFilter.services.coming_soon. +type RowFilterServicesComingSoon = string + +// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. +type RowFilterServicesComputeUnitsPerRelay = string + +// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. +type RowFilterServicesCreatedAt = string + +// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. +type RowFilterServicesDeletedAt = string + +// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. +type RowFilterServicesHardFallbackEnabled = string + +// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. +type RowFilterServicesNetworkId = string + +// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. +type RowFilterServicesQualityFallbackEnabled = string + +// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. +type RowFilterServicesServiceDomains = string + +// RowFilterServicesServiceId defines model for rowFilter.services.service_id. +type RowFilterServicesServiceId = string + +// RowFilterServicesServiceName defines model for rowFilter.services.service_name. +type RowFilterServicesServiceName = string + +// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. +type RowFilterServicesServiceOwnerAddress = string + +// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. +type RowFilterServicesSvgIcon = string + +// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. +type RowFilterServicesUpdatedAt = string + +// Select defines model for select. +type Select = string + +// DeleteApplicationsParams defines parameters for DeleteApplications. +type DeleteApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. +type DeleteApplicationsParamsPrefer string + +// GetApplicationsParams defines parameters for GetApplications. +type GetApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetApplicationsParamsPrefer defines parameters for GetApplications. +type GetApplicationsParamsPrefer string + +// PatchApplicationsParams defines parameters for PatchApplications. +type PatchApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchApplicationsParamsPrefer defines parameters for PatchApplications. +type PatchApplicationsParamsPrefer string + +// PostApplicationsParams defines parameters for PostApplications. +type PostApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostApplicationsParamsPrefer defines parameters for PostApplications. +type PostApplicationsParamsPrefer string + +// DeleteGatewaysParams defines parameters for DeleteGateways. +type DeleteGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. +type DeleteGatewaysParamsPrefer string + +// GetGatewaysParams defines parameters for GetGateways. +type GetGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// GetGatewaysParamsPrefer defines parameters for GetGateways. +type GetGatewaysParamsPrefer string + +// PatchGatewaysParams defines parameters for PatchGateways. +type PatchGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchGatewaysParamsPrefer defines parameters for PatchGateways. +type PatchGatewaysParamsPrefer string + +// PostGatewaysParams defines parameters for PostGateways. +type PostGatewaysParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PostGatewaysParamsPrefer defines parameters for PostGateways. +type PostGatewaysParamsPrefer string + +// DeleteNetworksParams defines parameters for DeleteNetworks. +type DeleteNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. +type DeleteNetworksParamsPrefer string + +// GetNetworksParams defines parameters for GetNetworks. +type GetNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetNetworksParamsPrefer defines parameters for GetNetworks. +type GetNetworksParamsPrefer string + +// PatchNetworksParams defines parameters for PatchNetworks. +type PatchNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchNetworksParamsPrefer defines parameters for PatchNetworks. +type PatchNetworksParamsPrefer string + +// PostNetworksParams defines parameters for PostNetworks. +type PostNetworksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostNetworksParamsPrefer defines parameters for PostNetworks. +type PostNetworksParamsPrefer string + +// DeleteOrganizationsParams defines parameters for DeleteOrganizations. +type DeleteOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. +type DeleteOrganizationsParamsPrefer string + +// GetOrganizationsParams defines parameters for GetOrganizations. +type GetOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. +type GetOrganizationsParamsPrefer string + +// PatchOrganizationsParams defines parameters for PatchOrganizations. +type PatchOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. +type PatchOrganizationsParamsPrefer string + +// PostOrganizationsParams defines parameters for PostOrganizations. +type PostOrganizationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. +type PostOrganizationsParamsPrefer string + +// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParamsPrefer string + +// GetPortalAccountsParams defines parameters for GetPortalAccounts. +type GetPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. +type GetPortalAccountsParamsPrefer string + +// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParamsPrefer string + +// PostPortalAccountsParams defines parameters for PostPortalAccounts. +type PostPortalAccountsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. +type PostPortalAccountsParamsPrefer string + +// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParamsPrefer string + +// GetPortalApplicationsParams defines parameters for GetPortalApplications. +type GetPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. +type GetPortalApplicationsParamsPrefer string + +// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParamsPrefer string + +// PostPortalApplicationsParams defines parameters for PostPortalApplications. +type PostPortalApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. +type PostPortalApplicationsParamsPrefer string + +// DeletePortalPlansParams defines parameters for DeletePortalPlans. +type DeletePortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. +type DeletePortalPlansParamsPrefer string + +// GetPortalPlansParams defines parameters for GetPortalPlans. +type GetPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. +type GetPortalPlansParamsPrefer string + +// PatchPortalPlansParams defines parameters for PatchPortalPlans. +type PatchPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. +type PatchPortalPlansParamsPrefer string + +// PostPortalPlansParams defines parameters for PostPortalPlans. +type PostPortalPlansParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. +type PostPortalPlansParamsPrefer string + +// GetRpcCreatePortalApplicationParams defines parameters for GetRpcCreatePortalApplication. +type GetRpcCreatePortalApplicationParams struct { + PPortalAccountId string `form:"p_portal_account_id" json:"p_portal_account_id"` + PPortalUserId string `form:"p_portal_user_id" json:"p_portal_user_id"` + PPortalApplicationName *string `form:"p_portal_application_name,omitempty" json:"p_portal_application_name,omitempty"` + PEmoji *string `form:"p_emoji,omitempty" json:"p_emoji,omitempty"` + PPortalApplicationUserLimit *int `form:"p_portal_application_user_limit,omitempty" json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `form:"p_portal_application_user_limit_interval,omitempty" json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `form:"p_portal_application_user_limit_rps,omitempty" json:"p_portal_application_user_limit_rps,omitempty"` + PPortalApplicationDescription *string `form:"p_portal_application_description,omitempty" json:"p_portal_application_description,omitempty"` + PFavoriteServiceIds *string `form:"p_favorite_service_ids,omitempty" json:"p_favorite_service_ids,omitempty"` + PSecretKeyRequired *string `form:"p_secret_key_required,omitempty" json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationJSONBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationJSONBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationParams defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationParams struct { + // Prefer Preference + Prefer *PostRpcCreatePortalApplicationParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcCreatePortalApplicationParamsPrefer defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationParamsPrefer string + +// PostRpcMeJSONBody defines parameters for PostRpcMe. +type PostRpcMeJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} + +// PostRpcMeParams defines parameters for PostRpcMe. +type PostRpcMeParams struct { + // Prefer Preference + Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcMeParamsPrefer defines parameters for PostRpcMe. +type PostRpcMeParamsPrefer string + +// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParamsPrefer string + +// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParamsPrefer string + +// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParamsPrefer string + +// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParamsPrefer string + +// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParamsPrefer string + +// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParamsPrefer string + +// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParamsPrefer string + +// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParamsPrefer string + +// DeleteServicesParams defines parameters for DeleteServices. +type DeleteServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServicesParamsPrefer defines parameters for DeleteServices. +type DeleteServicesParamsPrefer string + +// GetServicesParams defines parameters for GetServices. +type GetServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServicesParamsPrefer defines parameters for GetServices. +type GetServicesParamsPrefer string + +// PatchServicesParams defines parameters for PatchServices. +type PatchServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServicesParamsPrefer defines parameters for PatchServices. +type PatchServicesParamsPrefer string + +// PostServicesParams defines parameters for PostServices. +type PostServicesParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServicesParamsPrefer defines parameters for PostServices. +type PostServicesParamsPrefer string + +// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. +type PatchApplicationsJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. +type PostApplicationsJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. +type PatchGatewaysJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + +// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. +type PostGatewaysJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + +// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. +type PatchNetworksJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. +type PostNetworksJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. +type PatchOrganizationsJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. +type PostOrganizationsJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. +type PatchPortalAccountsJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. +type PostPortalAccountsJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. +type PatchPortalApplicationsJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. +type PostPortalApplicationsJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. +type PatchPortalPlansJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. +type PostPortalPlansJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostRpcCreatePortalApplicationJSONRequestBody defines body for PostRpcCreatePortalApplication for application/json ContentType. +type PostRpcCreatePortalApplicationJSONRequestBody PostRpcCreatePortalApplicationJSONBody + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json ContentType. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. +type PostRpcMeJSONRequestBody = PostRpcMeJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. +type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. +type PostServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. +type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. +type PostServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. +type PatchServicesJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services + +// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. +type PostServicesJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services From 546354d6ebc8b4037a2c57dfc63b414257afb4b0 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 11:12:10 +0100 Subject: [PATCH 14/43] fix: implement review comments --- portal-db/api/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/portal-db/api/README.md b/portal-db/api/README.md index aa0563eb2..c90711a61 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -1,5 +1,7 @@ # Portal Database API + + This folder contains **PostgREST configuration** and **SDK generation tools** for the Portal Database. PostgREST automatically creates a REST API from the Portal DB PostgreSQL database schema. From d5e69286b7216107e8caa4557d655ab39e811ce9 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 12:04:26 +0100 Subject: [PATCH 15/43] add Typescript SDK --- portal-db/README.md | 8 + portal-db/api/codegen/generate-sdks.sh | 277 ++- portal-db/api/scripts/gen-jwt.sh | 23 + portal-db/sdk/typescript/README.md | 94 +- portal-db/sdk/typescript/index.ts | 75 + portal-db/sdk/typescript/package.json | 20 + portal-db/sdk/typescript/tsconfig.json | 19 + portal-db/sdk/typescript/types.d.ts | 2439 ++++++++++++++++++++++++ 8 files changed, 2931 insertions(+), 24 deletions(-) create mode 100644 portal-db/sdk/typescript/index.ts create mode 100644 portal-db/sdk/typescript/package.json create mode 100644 portal-db/sdk/typescript/tsconfig.json create mode 100644 portal-db/sdk/typescript/types.d.ts diff --git a/portal-db/README.md b/portal-db/README.md index 8a87efadb..3f94fe0cf 100644 --- a/portal-db/README.md +++ b/portal-db/README.md @@ -10,6 +10,13 @@ The Portal DB includes a **PostgREST API** that automatically generates REST end **โžก๏ธ [View PostgREST API Documentation](api/README.md)** for setup, authentication, and SDK usage. +## ๐Ÿ’ป REST API Client SDKs + +The Portal DB includes client SDKs for both Go and TypeScript. + +**โžก๏ธ [View Go SDK Documentation](sdk/go/README.md)** +**โžก๏ธ [View TypeScript SDK Documentation](sdk/typescript/README.md)** + :::info TODO: Revisit docs location Consider if this should be moved into `docusaurus/docs` so it is discoverable as part of [path.grove.city](https://path.grove.city/). @@ -19,6 +26,7 @@ Consider if this should be moved into `docusaurus/docs` so it is discoverable as ## Table of Contents - [๐ŸŒ REST API Access](#-rest-api-access) +- [๐Ÿ’ป REST API Client SDKs](#-rest-api-client-sdks) - [Quickstart (for Grove Engineering)](#quickstart-for-grove-engineering) - [Interacting with the database](#interacting-with-the-database) - [`make` Targets](#make-targets) diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 9e67f72c0..65b795169 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -1,15 +1,9 @@ #!/bin/bash -# Generate Go SDK from OpenAPI specification using oapi-codegen -# This script generates a Go client SDK for the Portal DB API - -# TODO_IMPLEMENT: Add TypeScript SDK generation support -# - Add TypeScript SDK generation alongside Go SDK generation -# - Use @openapitools/openapi-generator-cli or similar tool -# - Target output: ../../sdk/typescript/ directory -# - Should generate: models, client, types, and documentation -# - Add TypeScript-specific configuration files similar to codegen-*.yaml -# - Priority: Medium - would significantly improve frontend/Node.js developer experience +# Generate Go and TypeScript SDKs from OpenAPI specification +# This script generates both Go and TypeScript SDKs for the Portal DB API +# - Go SDK: Uses oapi-codegen for client and models generation +# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation set -e @@ -18,6 +12,7 @@ OPENAPI_DIR="../openapi" OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" GO_OUTPUT_DIR="../../sdk/go" +TS_OUTPUT_DIR="../../sdk/typescript" CONFIG_MODELS="./codegen-models.yaml" CONFIG_CLIENT="./codegen-client.yaml" POSTGREST_URL="http://localhost:3000" @@ -29,7 +24,7 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification using oapi-codegen..." +echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." # ============================================================================ # PHASE 1: ENVIRONMENT VALIDATION @@ -62,6 +57,37 @@ fi echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" +# Check if Node.js and npm are installed for TypeScript SDK generation +if ! command -v node >/dev/null 2>&1; then + echo -e "${RED}โŒ Node.js is not installed. Please install Node.js first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Node.js is installed: $(node --version)${NC}" + +if ! command -v npm >/dev/null 2>&1; then + echo -e "${RED}โŒ npm is not installed. Please install npm first.${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" + +# Check if openapi-typescript is installed +if ! command -v openapi-typescript >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing openapi-typescript..." + npm install -g openapi-typescript + + # Verify installation + if ! command -v openapi-typescript >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install openapi-typescript. Please check your Node.js/npm installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… openapi-typescript is available: $(openapi-typescript --version 2>/dev/null || echo 'installed')${NC}" + # Check if PostgREST is running echo "๐ŸŒ Checking PostgREST availability..." if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then @@ -187,6 +213,107 @@ fi echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" +echo "" +echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." + +# Create TypeScript output directory if it doesn't exist +mkdir -p "$TS_OUTPUT_DIR" + +# Clean previous generated TypeScript files (keep permanent files) +echo "๐Ÿงน Cleaning previous TypeScript generated files..." +rm -f "$TS_OUTPUT_DIR/types.d.ts" + +# Generate TypeScript types using openapi-typescript (following official best practices) +echo " Generating types.d.ts..." +if ! openapi-typescript "$OPENAPI_V3_FILE" --output "$TS_OUTPUT_DIR/types.d.ts"; then + echo -e "${RED}โŒ Failed to generate TypeScript types${NC}" + exit 1 +fi + +# Create index.ts file for easy imports (following official patterns) +if [ ! -f "$TS_OUTPUT_DIR/index.ts" ]; then + echo " Creating index.ts..." + cat > "$TS_OUTPUT_DIR/index.ts" << 'EOF' +/** + * Grove Portal DB TypeScript SDK + * + * Generated types from OpenAPI specification using openapi-typescript. + * For a complete fetch client, consider using openapi-fetch alongside these types. + * + * @see https://openapi-ts.dev/introduction + */ + +// Export all generated types +export type * from './types'; + +// Re-export commonly used types for convenience +export type { paths, components, operations } from './types'; + +/** + * Basic fetch wrapper with type safety + * + * For production use, consider openapi-fetch: + * npm install openapi-fetch + * + * Example with openapi-fetch: + * ```typescript + * import createClient from 'openapi-fetch'; + * import type { paths } from './types'; + * + * const client = createClient({ baseUrl: 'http://localhost:3000' }); + * const { data, error } = await client.GET('/users'); + * ``` + */ +export async function createTypedFetch( + baseUrl: string, + options?: { + headers?: Record; + timeout?: number; + } +) { + const defaultHeaders = { + 'Content-Type': 'application/json', + ...options?.headers, + }; + + return { + async request< + Path extends keyof paths, + Method extends keyof paths[Path], + RequestBody = paths[Path][Method] extends { requestBody: { content: { 'application/json': infer T } } } ? T : never, + ResponseBody = paths[Path][Method] extends { responses: { 200: { content: { 'application/json': infer T } } } } ? T : unknown + >( + method: Method, + path: Path, + init?: RequestInit & { body?: RequestBody } + ): Promise { + const url = `${baseUrl}${String(path)}`; + + const response = await fetch(url, { + method: String(method).toUpperCase(), + headers: defaultHeaders, + body: init?.body ? JSON.stringify(init.body) : undefined, + ...init, + }); + + if (!response.ok) { + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + } + + const contentType = response.headers.get('content-type'); + if (contentType?.includes('application/json')) { + return await response.json(); + } + + return {} as ResponseBody; + } + }; +} +EOF +fi + +echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" + # ============================================================================ # PHASE 4: MODULE SETUP # ============================================================================ @@ -220,6 +347,86 @@ echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" # Return to scripts directory cd - >/dev/null +# TypeScript module setup +echo "" +echo "๐Ÿ”ท Setting up TypeScript module..." + +# Navigate to TypeScript SDK directory +cd "$TS_OUTPUT_DIR" + +# Create package.json if it doesn't exist +if [ ! -f "package.json" ]; then + echo "๐Ÿ“ฆ Creating package.json..." + cat > package.json << 'EOF' +{ + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "description": "TypeScript SDK for Grove Portal DB API", + "main": "index.ts", + "types": "types.d.ts", + "scripts": { + "build": "tsc", + "type-check": "tsc --noEmit" + }, + "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], + "author": "Grove Team", + "license": "MIT", + "devDependencies": { + "typescript": "^5.0.0" + }, + "peerDependencies": { + "typescript": ">=4.5.0" + } +} +EOF +fi + +# Create tsconfig.json if it doesn't exist +if [ ! -f "tsconfig.json" ]; then + echo "๐Ÿ”ง Creating tsconfig.json..." + cat > tsconfig.json << 'EOF' +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020", "DOM"], + "moduleResolution": "Bundler", + "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "outDir": "./dist" + }, + "include": ["types.d.ts", "index.ts"], + "exclude": ["node_modules", "dist"] +} +EOF +fi + +echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" + +# Test TypeScript compilation if TypeScript is available +if command -v tsc >/dev/null 2>&1; then + echo "๐Ÿ” Validating TypeScript compilation..." + if ! npx tsc --noEmit; then + echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" + echo " This may be due to missing dependencies or configuration issues" + echo " The generated types.ts file should still be usable" + else + echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" + fi +else + echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" + echo " Install TypeScript globally: npm install -g typescript" +fi + +# Return to scripts directory +cd - >/dev/null + # ============================================================================ # SUCCESS SUMMARY # ============================================================================ @@ -228,30 +435,54 @@ echo "" echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" echo "" echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" -echo " API Docs: $OPENAPI_V3_FILE" -echo " SDK: $GO_OUTPUT_DIR" +echo " API Docs: $OPENAPI_V3_FILE" +echo " Go SDK: $GO_OUTPUT_DIR" +echo " TypeScript: $TS_OUTPUT_DIR" +echo "" +echo -e "${BLUE}๐Ÿน Go SDK:${NC}" echo " Module: github.com/grove/path/portal-db/sdk/go" echo " Package: portaldb" -echo "" -echo -e "${BLUE}๐Ÿ“š SDK Files:${NC}" +echo " Files:" echo " โ€ข models.go - Generated data models and types (updated)" echo " โ€ข client.go - Generated SDK client and methods (updated)" echo " โ€ข go.mod - Go module definition (permanent)" echo " โ€ข README.md - Documentation (permanent)" echo "" +echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" +echo " Package: @grove/portal-db-sdk" +echo " Runtime: Zero dependencies (uses native fetch)" +echo " Files:" +echo " โ€ข types.d.ts - Generated TypeScript types (updated)" +echo " โ€ข index.ts - Main entry point with utilities (permanent)" +echo " โ€ข package.json - Node.js package definition (permanent)" +echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" echo "" -echo -e "${BLUE}๐Ÿš€ Next steps:${NC}" -echo " 1. Review the generated models: cat $GO_OUTPUT_DIR/models.go | head -50" -echo " 2. Review the generated client: cat $GO_OUTPUT_DIR/client.go | head -50" +echo -e "${BLUE}๐Ÿš€ Next Steps:${NC}" +echo "" +echo -e "${BLUE}Go SDK:${NC}" +echo " 1. Review generated models: cat $GO_OUTPUT_DIR/models.go | head -50" +echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" -echo " 4. Check the README: cat $GO_OUTPUT_DIR/README.md" +echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" +echo "" +echo -e "${BLUE}TypeScript SDK:${NC}" +echo " 1. Review generated types: cat $TS_OUTPUT_DIR/types.d.ts | head -50" +echo " 2. Review main entry: cat $TS_OUTPUT_DIR/index.ts | head -30" +echo " 3. Copy to your React project or publish as npm package" +echo " 4. Import types: import type { paths, components } from './types'" +echo " 5. Use with fetch: await createTypedFetch('http://localhost:3000')" +echo " 6. Or use openapi-fetch: npm install openapi-fetch (recommended)" +echo " 7. Check documentation: cat $TS_OUTPUT_DIR/README.md" echo "" echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" -echo " โ€ข Generated files: models.go (data types), client.go (API methods)" -echo " โ€ข Permanent files: go.mod, README.md" -echo " โ€ข Better readability: types separated from client logic" -echo " โ€ข Run this script after database schema changes" +echo " โ€ข Go: Full client with methods, types separated for readability" +echo " โ€ข TypeScript: Generated types + optional type-safe client helper" +echo " โ€ข Both SDKs update automatically when you run this script" +echo " โ€ข Run after database schema changes to stay in sync" +echo " โ€ข TypeScript SDK has zero runtime dependencies" echo "" echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/api/scripts/gen-jwt.sh b/portal-db/api/scripts/gen-jwt.sh index 81b7aae9b..3badb903c 100755 --- a/portal-db/api/scripts/gen-jwt.sh +++ b/portal-db/api/scripts/gen-jwt.sh @@ -21,6 +21,29 @@ set -e # Exit on any error # JWT secret from postgrest.conf (must match exactly) JWT_SECRET="supersecretjwtsecretforlocaldevelopment123456789" +# Check for help flag first +if [[ "$1" == "--help" || "$1" == "-h" ]]; then + cat << 'EOF' +# ============================================================================ +# JWT Token Generator for PostgREST (Shell Script Version) +# ============================================================================ +# Generates JWT tokens for PostgREST authentication using shell commands +# Following PostgREST Tutorial: https://docs.postgrest.org/en/v13/tutorials/tut1.html +# +# Dependencies: +# - openssl (for HMAC-SHA256 signing) +# - base64 (for encoding) +# - jq (for JSON processing) +# +# Usage: +# ./gen-jwt.sh # Generate token for 'authenticated' role +# ./gen-jwt.sh anon # Generate token for 'anon' role +# ./gen-jwt.sh authenticated user@email # Generate token with specific email +# ./gen-jwt.sh --help # Show this help message +EOF + exit 0 +fi + # Get command line arguments ROLE="${1:-authenticated}" EMAIL="${2:-john@doe.com}" diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 7943b20da..07cd74cd7 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1 +1,93 @@ - \ No newline at end of file +# Grove Portal DB TypeScript SDK + +Type-safe TypeScript SDK for the Grove Portal DB API generated using [openapi-typescript](https://openapi-ts.dev/introduction). + +## Installation + +```bash +npm install @grove/portal-db-sdk +``` + +> **TODO**: Publish this package to npm registry + +## Quick Start + +React integration with [openapi-react-query](https://openapi-ts.dev/openapi-react-query/): + +```bash +npm install openapi-react-query openapi-fetch @tanstack/react-query +``` + +```typescript +import createFetchClient from "openapi-fetch"; +import createClient from "openapi-react-query"; +import type { paths } from "@grove/portal-db-sdk"; + +// Create clients +const fetchClient = createFetchClient({ + baseUrl: "http://localhost:3000", +}); +const $api = createClient(fetchClient); + +// Use in React components +function PortalApplicationsList() { + const { data: applications, error, isLoading } = $api.useQuery( + "get", + "/portal_applications" + ); + + if (isLoading) return "Loading..."; + if (error) return `Error: ${error.message}`; + + return ( +
    + {applications?.map(app => ( +
  • + {app.emoji} {app.portal_application_name} +
  • + ))} +
+ ); +} + +function CreateApplication() { + const { mutate } = $api.useMutation("post", "/rpc/create_portal_application"); + + return ( + + ); +} +``` + +## Authentication + +Add JWT tokens to your requests: + +```typescript +import createFetchClient from "openapi-fetch"; + +// With JWT auth +const fetchClient = createFetchClient({ + baseUrl: "http://localhost:3000", + headers: { + Authorization: `Bearer ${jwtToken}` + } +}); + +// Or set auth dynamically +fetchClient.use("auth", (request) => { + const token = localStorage.getItem('jwt-token'); + if (token) { + request.headers.set('Authorization', `Bearer ${token}`); + } +}); +``` \ No newline at end of file diff --git a/portal-db/sdk/typescript/index.ts b/portal-db/sdk/typescript/index.ts new file mode 100644 index 000000000..85c149934 --- /dev/null +++ b/portal-db/sdk/typescript/index.ts @@ -0,0 +1,75 @@ +/** + * Grove Portal DB TypeScript SDK + * + * Generated types from OpenAPI specification using openapi-typescript. + * For a complete fetch client, consider using openapi-fetch alongside these types. + * + * @see https://openapi-ts.dev/introduction + */ + +// Export all generated types +export type * from './types'; + +// Re-export commonly used types for convenience +export type { paths, components, operations } from './types'; + +/** + * Basic fetch wrapper with type safety + * + * For production use, consider openapi-fetch: + * npm install openapi-fetch + * + * Example with openapi-fetch: + * ```typescript + * import createClient from 'openapi-fetch'; + * import type { paths } from './types'; + * + * const client = createClient({ baseUrl: 'http://localhost:3000' }); + * const { data, error } = await client.GET('/users'); + * ``` + */ +export async function createTypedFetch( + baseUrl: string, + options?: { + headers?: Record; + timeout?: number; + } +) { + const defaultHeaders = { + 'Content-Type': 'application/json', + ...options?.headers, + }; + + return { + async request< + Path extends keyof paths, + Method extends keyof paths[Path], + RequestBody = paths[Path][Method] extends { requestBody: { content: { 'application/json': infer T } } } ? T : never, + ResponseBody = paths[Path][Method] extends { responses: { 200: { content: { 'application/json': infer T } } } } ? T : unknown + >( + method: Method, + path: Path, + init?: RequestInit & { body?: RequestBody } + ): Promise { + const url = `${baseUrl}${String(path)}`; + + const response = await fetch(url, { + method: String(method).toUpperCase(), + headers: defaultHeaders, + body: init?.body ? JSON.stringify(init.body) : undefined, + ...init, + }); + + if (!response.ok) { + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + } + + const contentType = response.headers.get('content-type'); + if (contentType?.includes('application/json')) { + return await response.json(); + } + + return {} as ResponseBody; + } + }; +} diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json new file mode 100644 index 000000000..4a4783a55 --- /dev/null +++ b/portal-db/sdk/typescript/package.json @@ -0,0 +1,20 @@ +{ + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "description": "TypeScript SDK for Grove Portal DB API", + "main": "index.ts", + "types": "types.d.ts", + "scripts": { + "build": "tsc", + "type-check": "tsc --noEmit" + }, + "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], + "author": "Grove Team", + "license": "MIT", + "devDependencies": { + "typescript": "^5.0.0" + }, + "peerDependencies": { + "typescript": ">=4.5.0" + } +} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json new file mode 100644 index 000000000..9d976fb4d --- /dev/null +++ b/portal-db/sdk/typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020", "DOM"], + "moduleResolution": "Bundler", + "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "outDir": "./dist" + }, + "include": ["types.d.ts", "index.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/portal-db/sdk/typescript/types.d.ts b/portal-db/sdk/typescript/types.d.ts new file mode 100644 index 000000000..ee42919b7 --- /dev/null +++ b/portal-db/sdk/typescript/types.d.ts @@ -0,0 +1,2439 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** OpenAPI description (this document) */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/service_fallbacks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Fallback URLs for services when primary endpoints fail */ + get: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["service_fallbacks"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"][]; + "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"][]; + "text/csv": components["schemas"]["service_fallbacks"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Fallback URLs for services when primary endpoints fail */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_fallbacks"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Fallback URLs for services when primary endpoints fail */ + delete: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Fallback URLs for services when primary endpoints fail */ + patch: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_fallbacks"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_plans": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Available subscription plans for Portal Accounts */ + get: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_plans"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"][]; + "text/csv": components["schemas"]["portal_plans"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Available subscription plans for Portal Accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_plans"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Available subscription plans for Portal Accounts */ + delete: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Available subscription plans for Portal Accounts */ + patch: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_plans"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/applications": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Onchain applications for processing relays through the network */ + get: { + parameters: { + query?: { + /** @description Blockchain address of the application */ + application_address?: components["parameters"]["rowFilter.applications.application_address"]; + gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; + service_id?: components["parameters"]["rowFilter.applications.service_id"]; + stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; + application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; + network_id?: components["parameters"]["rowFilter.applications.network_id"]; + created_at?: components["parameters"]["rowFilter.applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["applications"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["applications"][]; + "application/vnd.pgrst.object+json": components["schemas"]["applications"][]; + "text/csv": components["schemas"]["applications"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Onchain applications for processing relays through the network */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["applications"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Onchain applications for processing relays through the network */ + delete: { + parameters: { + query?: { + /** @description Blockchain address of the application */ + application_address?: components["parameters"]["rowFilter.applications.application_address"]; + gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; + service_id?: components["parameters"]["rowFilter.applications.service_id"]; + stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; + application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; + network_id?: components["parameters"]["rowFilter.applications.network_id"]; + created_at?: components["parameters"]["rowFilter.applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Onchain applications for processing relays through the network */ + patch: { + parameters: { + query?: { + /** @description Blockchain address of the application */ + application_address?: components["parameters"]["rowFilter.applications.application_address"]; + gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; + service_id?: components["parameters"]["rowFilter.applications.service_id"]; + stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; + application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; + network_id?: components["parameters"]["rowFilter.applications.network_id"]; + created_at?: components["parameters"]["rowFilter.applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["applications"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_applications": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Applications created within portal accounts with their own rate limits and settings */ + get: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_applications"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"][]; + "text/csv": components["schemas"]["portal_applications"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Applications created within portal accounts with their own rate limits and settings */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_applications"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Applications created within portal accounts with their own rate limits and settings */ + delete: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Applications created within portal accounts with their own rate limits and settings */ + patch: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_applications"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/services": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Supported blockchain services from the Pocket Network */ + get: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["services"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"][]; + "application/vnd.pgrst.object+json": components["schemas"]["services"][]; + "text/csv": components["schemas"]["services"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Supported blockchain services from the Pocket Network */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["services"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Supported blockchain services from the Pocket Network */ + delete: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Supported blockchain services from the Pocket Network */ + patch: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["services"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_accounts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Multi-tenant accounts with plans and billing integration */ + get: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_accounts"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"][]; + "text/csv": components["schemas"]["portal_accounts"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Multi-tenant accounts with plans and billing integration */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_accounts"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Multi-tenant accounts with plans and billing integration */ + delete: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Multi-tenant accounts with plans and billing integration */ + patch: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_accounts"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/organizations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Companies or customer groups that can be attached to Portal Accounts */ + get: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["organizations"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"][]; + "application/vnd.pgrst.object+json": components["schemas"]["organizations"][]; + "text/csv": components["schemas"]["organizations"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Companies or customer groups that can be attached to Portal Accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["organizations"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Companies or customer groups that can be attached to Portal Accounts */ + delete: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Companies or customer groups that can be attached to Portal Accounts */ + patch: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["organizations"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/networks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + get: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["networks"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"][]; + "application/vnd.pgrst.object+json": components["schemas"]["networks"][]; + "text/csv": components["schemas"]["networks"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["networks"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + delete: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + patch: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["networks"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/gateways": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Onchain gateway information including stake and network details */ + get: { + parameters: { + query?: { + /** @description Blockchain address of the gateway */ + gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; + /** @description Amount of tokens staked by the gateway */ + stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; + network_id?: components["parameters"]["rowFilter.gateways.network_id"]; + gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; + created_at?: components["parameters"]["rowFilter.gateways.created_at"]; + updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["gateways"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["gateways"][]; + "application/vnd.pgrst.object+json": components["schemas"]["gateways"][]; + "text/csv": components["schemas"]["gateways"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Onchain gateway information including stake and network details */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["gateways"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Onchain gateway information including stake and network details */ + delete: { + parameters: { + query?: { + /** @description Blockchain address of the gateway */ + gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; + /** @description Amount of tokens staked by the gateway */ + stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; + network_id?: components["parameters"]["rowFilter.gateways.network_id"]; + gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; + created_at?: components["parameters"]["rowFilter.gateways.created_at"]; + updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Onchain gateway information including stake and network details */ + patch: { + parameters: { + query?: { + /** @description Blockchain address of the gateway */ + gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; + /** @description Amount of tokens staked by the gateway */ + stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; + stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; + network_id?: components["parameters"]["rowFilter.gateways.network_id"]; + gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; + created_at?: components["parameters"]["rowFilter.gateways.created_at"]; + updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["gateways"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/service_endpoints": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Available endpoint types for each service */ + get: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["service_endpoints"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"][]; + "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"][]; + "text/csv": components["schemas"]["service_endpoints"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Available endpoint types for each service */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_endpoints"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Available endpoint types for each service */ + delete: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Available endpoint types for each service */ + patch: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_endpoints"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/rpc/me": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": Record; + "application/vnd.pgrst.object+json;nulls=stripped": Record; + "application/vnd.pgrst.object+json": Record; + "text/csv": Record; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/create_portal_application": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + * @description Validates user membership in the account before creation. + * Returns the application details including the generated secret key. + * This function is exposed via PostgREST as POST /rpc/create_portal_application + */ + get: { + parameters: { + query: { + p_portal_account_id: string; + p_portal_user_id: string; + p_portal_application_name?: string; + p_emoji?: string; + p_portal_application_user_limit?: number; + p_portal_application_user_limit_interval?: string; + p_portal_application_user_limit_rps?: number; + p_portal_application_description?: string; + p_favorite_service_ids?: string; + p_secret_key_required?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + * @description Validates user membership in the account before creation. + * Returns the application details including the generated secret key. + * This function is exposed via PostgREST as POST /rpc/create_portal_application + */ + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** Format: character varying */ + p_emoji?: string; + /** Format: character varying[] */ + p_favorite_service_ids?: string[]; + /** Format: character varying */ + p_portal_account_id: string; + /** Format: character varying */ + p_portal_application_description?: string; + /** Format: character varying */ + p_portal_application_name?: string; + /** Format: integer */ + p_portal_application_user_limit?: number; + /** Format: plan_interval */ + p_portal_application_user_limit_interval?: string; + /** Format: integer */ + p_portal_application_user_limit_rps?: number; + /** Format: character varying */ + p_portal_user_id: string; + /** Format: text */ + p_secret_key_required?: string; + }; + "application/vnd.pgrst.object+json;nulls=stripped": { + /** Format: character varying */ + p_emoji?: string; + /** Format: character varying[] */ + p_favorite_service_ids?: string[]; + /** Format: character varying */ + p_portal_account_id: string; + /** Format: character varying */ + p_portal_application_description?: string; + /** Format: character varying */ + p_portal_application_name?: string; + /** Format: integer */ + p_portal_application_user_limit?: number; + /** Format: plan_interval */ + p_portal_application_user_limit_interval?: string; + /** Format: integer */ + p_portal_application_user_limit_rps?: number; + /** Format: character varying */ + p_portal_user_id: string; + /** Format: text */ + p_secret_key_required?: string; + }; + "application/vnd.pgrst.object+json": { + /** Format: character varying */ + p_emoji?: string; + /** Format: character varying[] */ + p_favorite_service_ids?: string[]; + /** Format: character varying */ + p_portal_account_id: string; + /** Format: character varying */ + p_portal_application_description?: string; + /** Format: character varying */ + p_portal_application_name?: string; + /** Format: integer */ + p_portal_application_user_limit?: number; + /** Format: plan_interval */ + p_portal_application_user_limit_interval?: string; + /** Format: integer */ + p_portal_application_user_limit_rps?: number; + /** Format: character varying */ + p_portal_user_id: string; + /** Format: text */ + p_secret_key_required?: string; + }; + "text/csv": { + /** Format: character varying */ + p_emoji?: string; + /** Format: character varying[] */ + p_favorite_service_ids?: string[]; + /** Format: character varying */ + p_portal_account_id: string; + /** Format: character varying */ + p_portal_application_description?: string; + /** Format: character varying */ + p_portal_application_name?: string; + /** Format: integer */ + p_portal_application_user_limit?: number; + /** Format: plan_interval */ + p_portal_application_user_limit_interval?: string; + /** Format: integer */ + p_portal_application_user_limit_rps?: number; + /** Format: character varying */ + p_portal_user_id: string; + /** Format: text */ + p_secret_key_required?: string; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** @description Fallback URLs for services when primary endpoints fail */ + service_fallbacks: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + service_fallback_id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `services.service_id`. + */ + service_id: string; + /** Format: character varying */ + fallback_url: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Available subscription plans for Portal Accounts */ + portal_plans: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + portal_plan_type: string; + /** Format: character varying */ + portal_plan_type_description?: string; + /** + * Format: integer + * @description Maximum usage allowed within the interval + */ + plan_usage_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + plan_usage_limit_interval?: "day" | "month" | "year"; + /** + * Format: integer + * @description Rate limit in requests per second + */ + plan_rate_limit_rps?: number; + /** Format: integer */ + plan_application_limit?: number; + }; + /** @description Onchain applications for processing relays through the network */ + applications: { + /** + * Format: character varying + * @description Blockchain address of the application + * + * Note: + * This is a Primary Key. + */ + application_address: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `gateways.gateway_address`. + */ + gateway_address: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `services.service_id`. + */ + service_id: string; + /** Format: bigint */ + stake_amount?: number; + /** Format: character varying */ + stake_denom?: string; + /** Format: character varying */ + application_private_key_hex?: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `networks.network_id`. + */ + network_id: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Applications created within portal accounts with their own rate limits and settings */ + portal_applications: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + * @default gen_random_uuid() + */ + portal_application_id: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + */ + portal_account_id: string; + /** Format: character varying */ + portal_application_name?: string; + /** Format: character varying */ + emoji?: string; + /** Format: integer */ + portal_application_user_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + portal_application_user_limit_interval?: "day" | "month" | "year"; + /** Format: integer */ + portal_application_user_limit_rps?: number; + /** Format: character varying */ + portal_application_description?: string; + /** Format: character varying[] */ + favorite_service_ids?: string[]; + /** + * Format: character varying + * @description Hashed secret key for application authentication + */ + secret_key_hash?: string; + /** @default false */ + secret_key_required: boolean; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Supported blockchain services from the Pocket Network */ + services: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + service_id: string; + /** Format: character varying */ + service_name: string; + /** + * Format: integer + * @description Cost in compute units for each relay + */ + compute_units_per_relay?: number; + /** + * Format: character varying[] + * @description Valid domains for this service + */ + service_domains: string[]; + /** Format: character varying */ + service_owner_address?: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `networks.network_id`. + */ + network_id?: string; + /** @default false */ + active: boolean; + /** @default false */ + beta: boolean; + /** @default false */ + coming_soon: boolean; + /** @default false */ + quality_fallback_enabled: boolean; + /** @default false */ + hard_fallback_enabled: boolean; + /** Format: text */ + svg_icon?: string; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Multi-tenant accounts with plans and billing integration */ + portal_accounts: { + /** + * Format: character varying + * @description Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @default gen_random_uuid() + */ + portal_account_id: string; + /** + * Format: integer + * @description Note: + * This is a Foreign Key to `organizations.organization_id`. + */ + organization_id?: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + */ + portal_plan_type: string; + /** Format: character varying */ + user_account_name?: string; + /** Format: character varying */ + internal_account_name?: string; + /** Format: integer */ + portal_account_user_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + portal_account_user_limit_interval?: "day" | "month" | "year"; + /** Format: integer */ + portal_account_user_limit_rps?: number; + /** Format: character varying */ + billing_type?: string; + /** + * Format: character varying + * @description Stripe subscription identifier for billing + */ + stripe_subscription_id?: string; + /** Format: character varying */ + gcp_account_id?: string; + /** Format: character varying */ + gcp_entitlement_id?: string; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Companies or customer groups that can be attached to Portal Accounts */ + organizations: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + organization_id: number; + /** + * Format: character varying + * @description Name of the organization + */ + organization_name: string; + /** + * Format: timestamp with time zone + * @description Soft delete timestamp + */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + networks: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + network_id: string; + }; + /** @description Onchain gateway information including stake and network details */ + gateways: { + /** + * Format: character varying + * @description Blockchain address of the gateway + * + * Note: + * This is a Primary Key. + */ + gateway_address: string; + /** + * Format: bigint + * @description Amount of tokens staked by the gateway + */ + stake_amount: number; + /** Format: character varying */ + stake_denom: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `networks.network_id`. + */ + network_id: string; + /** Format: character varying */ + gateway_private_key_hex?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Available endpoint types for each service */ + service_endpoints: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + endpoint_id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `services.service_id`. + */ + service_id: string; + /** + * Format: public.endpoint_type + * @enum {string} + */ + endpoint_type?: "cometBFT" | "cosmos" | "REST" | "JSON-RPC" | "WSS" | "gRPC"; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + }; + responses: never; + parameters: { + /** @description Preference */ + preferParams: "params=single-object"; + /** @description Preference */ + preferReturn: "return=representation" | "return=minimal" | "return=none"; + /** @description Preference */ + preferCount: "count=none"; + /** @description Preference */ + preferPost: "return=representation" | "return=minimal" | "return=none" | "resolution=ignore-duplicates" | "resolution=merge-duplicates"; + /** @description Filtering Columns */ + select: string; + /** @description On Conflict */ + on_conflict: string; + /** @description Ordering */ + order: string; + /** @description Limiting and Pagination */ + range: string; + /** @description Limiting and Pagination */ + rangeUnit: string; + /** @description Limiting and Pagination */ + offset: string; + /** @description Limiting and Pagination */ + limit: string; + "rowFilter.service_fallbacks.service_fallback_id": string; + "rowFilter.service_fallbacks.service_id": string; + "rowFilter.service_fallbacks.fallback_url": string; + "rowFilter.service_fallbacks.created_at": string; + "rowFilter.service_fallbacks.updated_at": string; + "rowFilter.portal_plans.portal_plan_type": string; + "rowFilter.portal_plans.portal_plan_type_description": string; + /** @description Maximum usage allowed within the interval */ + "rowFilter.portal_plans.plan_usage_limit": string; + "rowFilter.portal_plans.plan_usage_limit_interval": string; + /** @description Rate limit in requests per second */ + "rowFilter.portal_plans.plan_rate_limit_rps": string; + "rowFilter.portal_plans.plan_application_limit": string; + /** @description Blockchain address of the application */ + "rowFilter.applications.application_address": string; + "rowFilter.applications.gateway_address": string; + "rowFilter.applications.service_id": string; + "rowFilter.applications.stake_amount": string; + "rowFilter.applications.stake_denom": string; + "rowFilter.applications.application_private_key_hex": string; + "rowFilter.applications.network_id": string; + "rowFilter.applications.created_at": string; + "rowFilter.applications.updated_at": string; + "rowFilter.portal_applications.portal_application_id": string; + "rowFilter.portal_applications.portal_account_id": string; + "rowFilter.portal_applications.portal_application_name": string; + "rowFilter.portal_applications.emoji": string; + "rowFilter.portal_applications.portal_application_user_limit": string; + "rowFilter.portal_applications.portal_application_user_limit_interval": string; + "rowFilter.portal_applications.portal_application_user_limit_rps": string; + "rowFilter.portal_applications.portal_application_description": string; + "rowFilter.portal_applications.favorite_service_ids": string; + /** @description Hashed secret key for application authentication */ + "rowFilter.portal_applications.secret_key_hash": string; + "rowFilter.portal_applications.secret_key_required": string; + "rowFilter.portal_applications.deleted_at": string; + "rowFilter.portal_applications.created_at": string; + "rowFilter.portal_applications.updated_at": string; + "rowFilter.services.service_id": string; + "rowFilter.services.service_name": string; + /** @description Cost in compute units for each relay */ + "rowFilter.services.compute_units_per_relay": string; + /** @description Valid domains for this service */ + "rowFilter.services.service_domains": string; + "rowFilter.services.service_owner_address": string; + "rowFilter.services.network_id": string; + "rowFilter.services.active": string; + "rowFilter.services.beta": string; + "rowFilter.services.coming_soon": string; + "rowFilter.services.quality_fallback_enabled": string; + "rowFilter.services.hard_fallback_enabled": string; + "rowFilter.services.svg_icon": string; + "rowFilter.services.deleted_at": string; + "rowFilter.services.created_at": string; + "rowFilter.services.updated_at": string; + /** @description Unique identifier for the portal account */ + "rowFilter.portal_accounts.portal_account_id": string; + "rowFilter.portal_accounts.organization_id": string; + "rowFilter.portal_accounts.portal_plan_type": string; + "rowFilter.portal_accounts.user_account_name": string; + "rowFilter.portal_accounts.internal_account_name": string; + "rowFilter.portal_accounts.portal_account_user_limit": string; + "rowFilter.portal_accounts.portal_account_user_limit_interval": string; + "rowFilter.portal_accounts.portal_account_user_limit_rps": string; + "rowFilter.portal_accounts.billing_type": string; + /** @description Stripe subscription identifier for billing */ + "rowFilter.portal_accounts.stripe_subscription_id": string; + "rowFilter.portal_accounts.gcp_account_id": string; + "rowFilter.portal_accounts.gcp_entitlement_id": string; + "rowFilter.portal_accounts.deleted_at": string; + "rowFilter.portal_accounts.created_at": string; + "rowFilter.portal_accounts.updated_at": string; + "rowFilter.organizations.organization_id": string; + /** @description Name of the organization */ + "rowFilter.organizations.organization_name": string; + /** @description Soft delete timestamp */ + "rowFilter.organizations.deleted_at": string; + "rowFilter.organizations.created_at": string; + "rowFilter.organizations.updated_at": string; + "rowFilter.networks.network_id": string; + /** @description Blockchain address of the gateway */ + "rowFilter.gateways.gateway_address": string; + /** @description Amount of tokens staked by the gateway */ + "rowFilter.gateways.stake_amount": string; + "rowFilter.gateways.stake_denom": string; + "rowFilter.gateways.network_id": string; + "rowFilter.gateways.gateway_private_key_hex": string; + "rowFilter.gateways.created_at": string; + "rowFilter.gateways.updated_at": string; + "rowFilter.service_endpoints.endpoint_id": string; + "rowFilter.service_endpoints.service_id": string; + "rowFilter.service_endpoints.endpoint_type": string; + "rowFilter.service_endpoints.created_at": string; + "rowFilter.service_endpoints.updated_at": string; + }; + requestBodies: { + /** @description portal_accounts */ + portal_accounts: { + content: { + "application/json": components["schemas"]["portal_accounts"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"]; + "text/csv": components["schemas"]["portal_accounts"]; + }; + }; + /** @description networks */ + networks: { + content: { + "application/json": components["schemas"]["networks"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"]; + "application/vnd.pgrst.object+json": components["schemas"]["networks"]; + "text/csv": components["schemas"]["networks"]; + }; + }; + /** @description gateways */ + gateways: { + content: { + "application/json": components["schemas"]["gateways"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["gateways"]; + "application/vnd.pgrst.object+json": components["schemas"]["gateways"]; + "text/csv": components["schemas"]["gateways"]; + }; + }; + /** @description service_endpoints */ + service_endpoints: { + content: { + "application/json": components["schemas"]["service_endpoints"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"]; + "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"]; + "text/csv": components["schemas"]["service_endpoints"]; + }; + }; + /** @description portal_applications */ + portal_applications: { + content: { + "application/json": components["schemas"]["portal_applications"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"]; + "text/csv": components["schemas"]["portal_applications"]; + }; + }; + /** @description service_fallbacks */ + service_fallbacks: { + content: { + "application/json": components["schemas"]["service_fallbacks"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"]; + "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"]; + "text/csv": components["schemas"]["service_fallbacks"]; + }; + }; + /** @description portal_plans */ + portal_plans: { + content: { + "application/json": components["schemas"]["portal_plans"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"]; + "text/csv": components["schemas"]["portal_plans"]; + }; + }; + /** @description applications */ + applications: { + content: { + "application/json": components["schemas"]["applications"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["applications"]; + "application/vnd.pgrst.object+json": components["schemas"]["applications"]; + "text/csv": components["schemas"]["applications"]; + }; + }; + /** @description services */ + services: { + content: { + "application/json": components["schemas"]["services"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"]; + "application/vnd.pgrst.object+json": components["schemas"]["services"]; + "text/csv": components["schemas"]["services"]; + }; + }; + /** @description organizations */ + organizations: { + content: { + "application/json": components["schemas"]["organizations"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"]; + "application/vnd.pgrst.object+json": components["schemas"]["organizations"]; + "text/csv": components["schemas"]["organizations"]; + }; + }; + }; + headers: never; + pathItems: never; +} +export type $defs = Record; +export type operations = Record; From 81edda50524a274caf8008582d77e54dac9092b8 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 19 Sep 2025 12:51:46 +0100 Subject: [PATCH 16/43] use better ts open api generation --- portal-db/api/codegen/generate-sdks.sh | 149 +- portal-db/api/codegen/openapitools.json | 7 + portal-db/sdk/typescript/.gitignore | 4 + portal-db/sdk/typescript/.npmignore | 1 + .../sdk/typescript/.openapi-generator-ignore | 23 + .../sdk/typescript/.openapi-generator/FILES | 34 + .../sdk/typescript/.openapi-generator/VERSION | 1 + portal-db/sdk/typescript/README.md | 119 +- portal-db/sdk/typescript/index.ts | 75 - portal-db/sdk/typescript/package.json | 23 +- .../typescript/src/apis/ApplicationsApi.ts | 397 +++ .../sdk/typescript/src/apis/GatewaysApi.ts | 367 +++ .../typescript/src/apis/IntrospectionApi.ts | 51 + .../sdk/typescript/src/apis/NetworksApi.ts | 277 ++ .../typescript/src/apis/OrganizationsApi.ts | 337 +++ .../typescript/src/apis/PortalAccountsApi.ts | 487 ++++ .../src/apis/PortalApplicationsApi.ts | 472 ++++ .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 +++ .../src/apis/RpcCreatePortalApplicationApi.ts | 184 ++ portal-db/sdk/typescript/src/apis/RpcMeApi.ts | 102 + .../src/apis/ServiceEndpointsApi.ts | 337 +++ .../src/apis/ServiceFallbacksApi.ts | 337 +++ .../sdk/typescript/src/apis/ServicesApi.ts | 487 ++++ portal-db/sdk/typescript/src/apis/index.ts | 15 + portal-db/sdk/typescript/src/index.ts | 5 + .../sdk/typescript/src/models/Applications.ts | 139 + .../sdk/typescript/src/models/Gateways.ts | 121 + .../sdk/typescript/src/models/Networks.ts | 67 + .../typescript/src/models/Organizations.ts | 100 + .../typescript/src/models/PortalAccounts.ts | 196 ++ .../src/models/PortalApplications.ts | 185 ++ .../sdk/typescript/src/models/PortalPlans.ts | 119 + .../RpcCreatePortalApplicationPostRequest.ts | 142 + .../typescript/src/models/ServiceEndpoints.ts | 116 + .../typescript/src/models/ServiceFallbacks.ts | 102 + .../sdk/typescript/src/models/Services.ts | 182 ++ portal-db/sdk/typescript/src/models/index.ts | 13 + portal-db/sdk/typescript/src/runtime.ts | 432 +++ portal-db/sdk/typescript/tsconfig.json | 29 +- portal-db/sdk/typescript/types.d.ts | 2439 ----------------- 40 files changed, 6323 insertions(+), 2702 deletions(-) create mode 100644 portal-db/api/codegen/openapitools.json create mode 100644 portal-db/sdk/typescript/.gitignore create mode 100644 portal-db/sdk/typescript/.npmignore create mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore create mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES create mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION delete mode 100644 portal-db/sdk/typescript/index.ts create mode 100644 portal-db/sdk/typescript/src/apis/ApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/GatewaysApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcMeApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/index.ts create mode 100644 portal-db/sdk/typescript/src/index.ts create mode 100644 portal-db/sdk/typescript/src/models/Applications.ts create mode 100644 portal-db/sdk/typescript/src/models/Gateways.ts create mode 100644 portal-db/sdk/typescript/src/models/Networks.ts create mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts create mode 100644 portal-db/sdk/typescript/src/models/Services.ts create mode 100644 portal-db/sdk/typescript/src/models/index.ts create mode 100644 portal-db/sdk/typescript/src/runtime.ts delete mode 100644 portal-db/sdk/typescript/types.d.ts diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 65b795169..d5c6966df 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -74,19 +74,37 @@ fi echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" -# Check if openapi-typescript is installed -if ! command -v openapi-typescript >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing openapi-typescript..." - npm install -g openapi-typescript +# Check if Java is installed +if ! command -v java >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" + echo " Install Java: brew install openjdk" + exit 1 +fi + +# Verify Java is working properly +if ! java -version >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" + echo " Fix Java installation: brew install openjdk" + echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" + exit 1 +fi + +JAVA_VERSION=$(java -version 2>&1 | head -n1) +echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" + +# Check if openapi-generator-cli is installed +if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing openapi-generator-cli..." + npm install -g @openapitools/openapi-generator-cli # Verify installation - if ! command -v openapi-typescript >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install openapi-typescript. Please check your Node.js/npm installation.${NC}" + if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" exit 1 fi fi -echo -e "${GREEN}โœ… openapi-typescript is available: $(openapi-typescript --version 2>/dev/null || echo 'installed')${NC}" +echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" # Check if PostgREST is running echo "๐ŸŒ Checking PostgREST availability..." @@ -221,96 +239,20 @@ mkdir -p "$TS_OUTPUT_DIR" # Clean previous generated TypeScript files (keep permanent files) echo "๐Ÿงน Cleaning previous TypeScript generated files..." -rm -f "$TS_OUTPUT_DIR/types.d.ts" - -# Generate TypeScript types using openapi-typescript (following official best practices) -echo " Generating types.d.ts..." -if ! openapi-typescript "$OPENAPI_V3_FILE" --output "$TS_OUTPUT_DIR/types.d.ts"; then - echo -e "${RED}โŒ Failed to generate TypeScript types${NC}" +rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" + +# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) +echo " Generating TypeScript client with built-in methods..." +if ! openapi-generator-cli generate \ + -i "$OPENAPI_V3_FILE" \ + -g typescript-fetch \ + -o "$TS_OUTPUT_DIR" \ + --skip-validate-spec \ + --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then + echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" exit 1 fi -# Create index.ts file for easy imports (following official patterns) -if [ ! -f "$TS_OUTPUT_DIR/index.ts" ]; then - echo " Creating index.ts..." - cat > "$TS_OUTPUT_DIR/index.ts" << 'EOF' -/** - * Grove Portal DB TypeScript SDK - * - * Generated types from OpenAPI specification using openapi-typescript. - * For a complete fetch client, consider using openapi-fetch alongside these types. - * - * @see https://openapi-ts.dev/introduction - */ - -// Export all generated types -export type * from './types'; - -// Re-export commonly used types for convenience -export type { paths, components, operations } from './types'; - -/** - * Basic fetch wrapper with type safety - * - * For production use, consider openapi-fetch: - * npm install openapi-fetch - * - * Example with openapi-fetch: - * ```typescript - * import createClient from 'openapi-fetch'; - * import type { paths } from './types'; - * - * const client = createClient({ baseUrl: 'http://localhost:3000' }); - * const { data, error } = await client.GET('/users'); - * ``` - */ -export async function createTypedFetch( - baseUrl: string, - options?: { - headers?: Record; - timeout?: number; - } -) { - const defaultHeaders = { - 'Content-Type': 'application/json', - ...options?.headers, - }; - - return { - async request< - Path extends keyof paths, - Method extends keyof paths[Path], - RequestBody = paths[Path][Method] extends { requestBody: { content: { 'application/json': infer T } } } ? T : never, - ResponseBody = paths[Path][Method] extends { responses: { 200: { content: { 'application/json': infer T } } } } ? T : unknown - >( - method: Method, - path: Path, - init?: RequestInit & { body?: RequestBody } - ): Promise { - const url = `${baseUrl}${String(path)}`; - - const response = await fetch(url, { - method: String(method).toUpperCase(), - headers: defaultHeaders, - body: init?.body ? JSON.stringify(init.body) : undefined, - ...init, - }); - - if (!response.ok) { - throw new Error(`HTTP ${response.status}: ${response.statusText}`); - } - - const contentType = response.headers.get('content-type'); - if (contentType?.includes('application/json')) { - return await response.json(); - } - - return {} as ResponseBody; - } - }; -} -EOF -fi echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" @@ -401,7 +343,7 @@ if [ ! -f "tsconfig.json" ]; then "declarationMap": true, "outDir": "./dist" }, - "include": ["types.d.ts", "index.ts"], + "include": ["src/**/*", "models/**/*", "apis/**/*"], "exclude": ["node_modules", "dist"] } EOF @@ -452,8 +394,8 @@ echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" echo " Package: @grove/portal-db-sdk" echo " Runtime: Zero dependencies (uses native fetch)" echo " Files:" -echo " โ€ข types.d.ts - Generated TypeScript types (updated)" -echo " โ€ข index.ts - Main entry point with utilities (permanent)" +echo " โ€ข apis/ - Generated API client classes (updated)" +echo " โ€ข models/ - Generated TypeScript models (updated)" echo " โ€ข package.json - Node.js package definition (permanent)" echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" echo " โ€ข README.md - Documentation (permanent)" @@ -470,17 +412,16 @@ echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/g echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" echo "" echo -e "${BLUE}TypeScript SDK:${NC}" -echo " 1. Review generated types: cat $TS_OUTPUT_DIR/types.d.ts | head -50" -echo " 2. Review main entry: cat $TS_OUTPUT_DIR/index.ts | head -30" +echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" +echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" echo " 3. Copy to your React project or publish as npm package" -echo " 4. Import types: import type { paths, components } from './types'" -echo " 5. Use with fetch: await createTypedFetch('http://localhost:3000')" -echo " 6. Or use openapi-fetch: npm install openapi-fetch (recommended)" -echo " 7. Check documentation: cat $TS_OUTPUT_DIR/README.md" +echo " 4. Import client: import { DefaultApi } from './apis'" +echo " 5. Use built-in methods: await client.portalApplicationsGet()" +echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" echo "" echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" echo " โ€ข Go: Full client with methods, types separated for readability" -echo " โ€ข TypeScript: Generated types + optional type-safe client helper" +echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" echo " โ€ข Both SDKs update automatically when you run this script" echo " โ€ข Run after database schema changes to stay in sync" echo " โ€ข TypeScript SDK has zero runtime dependencies" diff --git a/portal-db/api/codegen/openapitools.json b/portal-db/api/codegen/openapitools.json new file mode 100644 index 000000000..a82623d64 --- /dev/null +++ b/portal-db/api/codegen/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.14.0" + } +} diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/portal-db/sdk/typescript/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore new file mode 100644 index 000000000..42061c01a --- /dev/null +++ b/portal-db/sdk/typescript/.npmignore @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES new file mode 100644 index 000000000..87944a7ee --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -0,0 +1,34 @@ +.gitignore +.npmignore +.openapi-generator-ignore +README.md +package.json +src/apis/ApplicationsApi.ts +src/apis/GatewaysApi.ts +src/apis/IntrospectionApi.ts +src/apis/NetworksApi.ts +src/apis/OrganizationsApi.ts +src/apis/PortalAccountsApi.ts +src/apis/PortalApplicationsApi.ts +src/apis/PortalPlansApi.ts +src/apis/RpcCreatePortalApplicationApi.ts +src/apis/RpcMeApi.ts +src/apis/ServiceEndpointsApi.ts +src/apis/ServiceFallbacksApi.ts +src/apis/ServicesApi.ts +src/apis/index.ts +src/index.ts +src/models/Applications.ts +src/models/Gateways.ts +src/models/Networks.ts +src/models/Organizations.ts +src/models/PortalAccounts.ts +src/models/PortalApplications.ts +src/models/PortalPlans.ts +src/models/RpcCreatePortalApplicationPostRequest.ts +src/models/ServiceEndpoints.ts +src/models/ServiceFallbacks.ts +src/models/Services.ts +src/models/index.ts +src/runtime.ts +tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION new file mode 100644 index 000000000..e465da431 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 07cd74cd7..b95617b40 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1,6 +1,6 @@ -# Grove Portal DB TypeScript SDK +# TypeScript SDK for Portal DB -Type-safe TypeScript SDK for the Grove Portal DB API generated using [openapi-typescript](https://openapi-ts.dev/introduction). +Auto-generated TypeScript client for the Portal Database API. ## Installation @@ -12,58 +12,69 @@ npm install @grove/portal-db-sdk ## Quick Start -React integration with [openapi-react-query](https://openapi-ts.dev/openapi-react-query/): +Built-in client methods (auto-generated): -```bash -npm install openapi-react-query openapi-fetch @tanstack/react-query +```typescript +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; + +// Create client +const config = new Configuration({ + basePath: "http://localhost:3000" +}); +const client = new PortalApplicationsApi(config); + +// Use built-in methods - no manual paths needed! +const applications = await client.portalApplicationsGet(); ``` +React integration: + ```typescript -import createFetchClient from "openapi-fetch"; -import createClient from "openapi-react-query"; -import type { paths } from "@grove/portal-db-sdk"; +import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; +import { useState, useEffect } from "react"; -// Create clients -const fetchClient = createFetchClient({ - baseUrl: "http://localhost:3000", -}); -const $api = createClient(fetchClient); +const config = new Configuration({ basePath: "http://localhost:3000" }); +const portalAppsClient = new PortalApplicationsApi(config); +const createAppClient = new RpcCreatePortalApplicationApi(config); -// Use in React components function PortalApplicationsList() { - const { data: applications, error, isLoading } = $api.useQuery( - "get", - "/portal_applications" - ); - - if (isLoading) return "Loading..."; - if (error) return `Error: ${error.message}`; + const [applications, setApplications] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + portalAppsClient.portalApplicationsGet().then((apps) => { + setApplications(apps); + setLoading(false); + }); + }, []); + + const createApp = async () => { + await createAppClient.rpcCreatePortalApplicationPost({ + rpcCreatePortalApplicationPostRequest: { + pPortalAccountId: "account-123", + pPortalUserId: "user-456", + pPortalApplicationName: "My App", + pEmoji: "๐Ÿš€" + } + }); + // Refresh list + const apps = await portalAppsClient.portalApplicationsGet(); + setApplications(apps); + }; - return ( -
    - {applications?.map(app => ( -
  • - {app.emoji} {app.portal_application_name} -
  • - ))} -
- ); -} + if (loading) return "Loading..."; -function CreateApplication() { - const { mutate } = $api.useMutation("post", "/rpc/create_portal_application"); - return ( - +
+ +
    + {applications.map(app => ( +
  • + {app.emoji} {app.portalApplicationName} +
  • + ))} +
+
); } ``` @@ -73,21 +84,13 @@ function CreateApplication() { Add JWT tokens to your requests: ```typescript -import createFetchClient from "openapi-fetch"; +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; // With JWT auth -const fetchClient = createFetchClient({ - baseUrl: "http://localhost:3000", - headers: { - Authorization: `Bearer ${jwtToken}` - } +const config = new Configuration({ + basePath: "http://localhost:3000", + accessToken: jwtToken }); -// Or set auth dynamically -fetchClient.use("auth", (request) => { - const token = localStorage.getItem('jwt-token'); - if (token) { - request.headers.set('Authorization', `Bearer ${token}`); - } -}); -``` \ No newline at end of file +const client = new PortalApplicationsApi(config); +``` diff --git a/portal-db/sdk/typescript/index.ts b/portal-db/sdk/typescript/index.ts deleted file mode 100644 index 85c149934..000000000 --- a/portal-db/sdk/typescript/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Grove Portal DB TypeScript SDK - * - * Generated types from OpenAPI specification using openapi-typescript. - * For a complete fetch client, consider using openapi-fetch alongside these types. - * - * @see https://openapi-ts.dev/introduction - */ - -// Export all generated types -export type * from './types'; - -// Re-export commonly used types for convenience -export type { paths, components, operations } from './types'; - -/** - * Basic fetch wrapper with type safety - * - * For production use, consider openapi-fetch: - * npm install openapi-fetch - * - * Example with openapi-fetch: - * ```typescript - * import createClient from 'openapi-fetch'; - * import type { paths } from './types'; - * - * const client = createClient({ baseUrl: 'http://localhost:3000' }); - * const { data, error } = await client.GET('/users'); - * ``` - */ -export async function createTypedFetch( - baseUrl: string, - options?: { - headers?: Record; - timeout?: number; - } -) { - const defaultHeaders = { - 'Content-Type': 'application/json', - ...options?.headers, - }; - - return { - async request< - Path extends keyof paths, - Method extends keyof paths[Path], - RequestBody = paths[Path][Method] extends { requestBody: { content: { 'application/json': infer T } } } ? T : never, - ResponseBody = paths[Path][Method] extends { responses: { 200: { content: { 'application/json': infer T } } } } ? T : unknown - >( - method: Method, - path: Path, - init?: RequestInit & { body?: RequestBody } - ): Promise { - const url = `${baseUrl}${String(path)}`; - - const response = await fetch(url, { - method: String(method).toUpperCase(), - headers: defaultHeaders, - body: init?.body ? JSON.stringify(init.body) : undefined, - ...init, - }); - - if (!response.ok) { - throw new Error(`HTTP ${response.status}: ${response.statusText}`); - } - - const contentType = response.headers.get('content-type'); - if (contentType?.includes('application/json')) { - return await response.json(); - } - - return {} as ResponseBody; - } - }; -} diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json index 4a4783a55..2cbb1e8a2 100644 --- a/portal-db/sdk/typescript/package.json +++ b/portal-db/sdk/typescript/package.json @@ -1,20 +1,19 @@ { "name": "@grove/portal-db-sdk", - "version": "1.0.0", - "description": "TypeScript SDK for Grove Portal DB API", - "main": "index.ts", - "types": "types.d.ts", + "version": "12.0.2 (a4e00ff)", + "description": "OpenAPI client for @grove/portal-db-sdk", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "type-check": "tsc --noEmit" + "prepare": "npm run build" }, - "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], - "author": "Grove Team", - "license": "MIT", "devDependencies": { - "typescript": "^5.0.0" - }, - "peerDependencies": { - "typescript": ">=4.5.0" + "typescript": "^4.0 || ^5.0" } } diff --git a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts new file mode 100644 index 000000000..a7a0827f0 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts @@ -0,0 +1,397 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Applications, +} from '../models/index'; +import { + ApplicationsFromJSON, + ApplicationsToJSON, +} from '../models/index'; + +export interface ApplicationsDeleteRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ApplicationsDeletePreferEnum; +} + +export interface ApplicationsGetRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ApplicationsGetPreferEnum; +} + +export interface ApplicationsPatchRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ApplicationsPatchPreferEnum; + applications?: Applications; +} + +export interface ApplicationsPostRequest { + select?: string; + prefer?: ApplicationsPostPreferEnum; + applications?: Applications; +} + +/** + * + */ +export class ApplicationsApi extends runtime.BaseAPI { + + /** + * Onchain applications for processing relays through the network + */ + async applicationsDeleteRaw(requestParameters: ApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsDelete(requestParameters: ApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsGetRaw(requestParameters: ApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationsFromJSON)); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsGet(requestParameters: ApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.applicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPatchRaw(requestParameters: ApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ApplicationsToJSON(requestParameters['applications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPatch(requestParameters: ApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPostRaw(requestParameters: ApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplicationsToJSON(requestParameters['applications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPost(requestParameters: ApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ApplicationsDeletePreferEnum = typeof ApplicationsDeletePreferEnum[keyof typeof ApplicationsDeletePreferEnum]; +/** + * @export + */ +export const ApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ApplicationsGetPreferEnum = typeof ApplicationsGetPreferEnum[keyof typeof ApplicationsGetPreferEnum]; +/** + * @export + */ +export const ApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ApplicationsPatchPreferEnum = typeof ApplicationsPatchPreferEnum[keyof typeof ApplicationsPatchPreferEnum]; +/** + * @export + */ +export const ApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ApplicationsPostPreferEnum = typeof ApplicationsPostPreferEnum[keyof typeof ApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts new file mode 100644 index 000000000..bbfc5f024 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts @@ -0,0 +1,367 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Gateways, +} from '../models/index'; +import { + GatewaysFromJSON, + GatewaysToJSON, +} from '../models/index'; + +export interface GatewaysDeleteRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + prefer?: GatewaysDeletePreferEnum; +} + +export interface GatewaysGetRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: GatewaysGetPreferEnum; +} + +export interface GatewaysPatchRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + prefer?: GatewaysPatchPreferEnum; + gateways?: Gateways; +} + +export interface GatewaysPostRequest { + select?: string; + prefer?: GatewaysPostPreferEnum; + gateways?: Gateways; +} + +/** + * + */ +export class GatewaysApi extends runtime.BaseAPI { + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysDeleteRaw(requestParameters: GatewaysDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysDelete(requestParameters: GatewaysDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysDeleteRaw(requestParameters, initOverrides); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysGetRaw(requestParameters: GatewaysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GatewaysFromJSON)); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysGet(requestParameters: GatewaysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.gatewaysGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPatchRaw(requestParameters: GatewaysPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: GatewaysToJSON(requestParameters['gateways']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPatch(requestParameters: GatewaysPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysPatchRaw(requestParameters, initOverrides); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPostRaw(requestParameters: GatewaysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GatewaysToJSON(requestParameters['gateways']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPost(requestParameters: GatewaysPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const GatewaysDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type GatewaysDeletePreferEnum = typeof GatewaysDeletePreferEnum[keyof typeof GatewaysDeletePreferEnum]; +/** + * @export + */ +export const GatewaysGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type GatewaysGetPreferEnum = typeof GatewaysGetPreferEnum[keyof typeof GatewaysGetPreferEnum]; +/** + * @export + */ +export const GatewaysPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type GatewaysPatchPreferEnum = typeof GatewaysPatchPreferEnum[keyof typeof GatewaysPatchPreferEnum]; +/** + * @export + */ +export const GatewaysPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type GatewaysPostPreferEnum = typeof GatewaysPostPreferEnum[keyof typeof GatewaysPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts new file mode 100644 index 000000000..b654b5e25 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +/** + * + */ +export class IntrospectionApi extends runtime.BaseAPI { + + /** + * OpenAPI description (this document) + */ + async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * OpenAPI description (this document) + */ + async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rootGetRaw(initOverrides); + } + +} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts new file mode 100644 index 000000000..7ed2eea64 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/NetworksApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Networks, +} from '../models/index'; +import { + NetworksFromJSON, + NetworksToJSON, +} from '../models/index'; + +export interface NetworksDeleteRequest { + networkId?: string; + prefer?: NetworksDeletePreferEnum; +} + +export interface NetworksGetRequest { + networkId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: NetworksGetPreferEnum; +} + +export interface NetworksPatchRequest { + networkId?: string; + prefer?: NetworksPatchPreferEnum; + networks?: Networks; +} + +export interface NetworksPostRequest { + select?: string; + prefer?: NetworksPostPreferEnum; + networks?: Networks; +} + +/** + * + */ +export class NetworksApi extends runtime.BaseAPI { + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.networksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const NetworksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; +/** + * @export + */ +export const NetworksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; +/** + * @export + */ +export const NetworksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; +/** + * @export + */ +export const NetworksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts new file mode 100644 index 000000000..9944fa2cd --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Organizations, +} from '../models/index'; +import { + OrganizationsFromJSON, + OrganizationsToJSON, +} from '../models/index'; + +export interface OrganizationsDeleteRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsDeletePreferEnum; +} + +export interface OrganizationsGetRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: OrganizationsGetPreferEnum; +} + +export interface OrganizationsPatchRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsPatchPreferEnum; + organizations?: Organizations; +} + +export interface OrganizationsPostRequest { + select?: string; + prefer?: OrganizationsPostPreferEnum; + organizations?: Organizations; +} + +/** + * + */ +export class OrganizationsApi extends runtime.BaseAPI { + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.organizationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const OrganizationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; +/** + * @export + */ +export const OrganizationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; +/** + * @export + */ +export const OrganizationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; +/** + * @export + */ +export const OrganizationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts new file mode 100644 index 000000000..f7db3d925 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccounts, +} from '../models/index'; +import { + PortalAccountsFromJSON, + PortalAccountsToJSON, +} from '../models/index'; + +export interface PortalAccountsDeleteRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsDeletePreferEnum; +} + +export interface PortalAccountsGetRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountsGetPreferEnum; +} + +export interface PortalAccountsPatchRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsPatchPreferEnum; + portalAccounts?: PortalAccounts; +} + +export interface PortalAccountsPostRequest { + select?: string; + prefer?: PortalAccountsPostPreferEnum; + portalAccounts?: PortalAccounts; +} + +/** + * + */ +export class PortalAccountsApi extends runtime.BaseAPI { + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPatchRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; +/** + * @export + */ +export const PortalAccountsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts new file mode 100644 index 000000000..4161669cc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts @@ -0,0 +1,472 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplications, +} from '../models/index'; +import { + PortalApplicationsFromJSON, + PortalApplicationsToJSON, +} from '../models/index'; + +export interface PortalApplicationsDeleteRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsDeletePreferEnum; +} + +export interface PortalApplicationsGetRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationsGetPreferEnum; +} + +export interface PortalApplicationsPatchRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsPatchPreferEnum; + portalApplications?: PortalApplications; +} + +export interface PortalApplicationsPostRequest { + select?: string; + prefer?: PortalApplicationsPostPreferEnum; + portalApplications?: PortalApplications; +} + +/** + * + */ +export class PortalApplicationsApi extends runtime.BaseAPI { + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts new file mode 100644 index 000000000..6400389ad --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts @@ -0,0 +1,352 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalPlans, +} from '../models/index'; +import { + PortalPlansFromJSON, + PortalPlansToJSON, +} from '../models/index'; + +export interface PortalPlansDeleteRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansDeletePreferEnum; +} + +export interface PortalPlansGetRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalPlansGetPreferEnum; +} + +export interface PortalPlansPatchRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansPatchPreferEnum; + portalPlans?: PortalPlans; +} + +export interface PortalPlansPostRequest { + select?: string; + prefer?: PortalPlansPostPreferEnum; + portalPlans?: PortalPlans; +} + +/** + * + */ +export class PortalPlansApi extends runtime.BaseAPI { + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalPlansGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPatchRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalPlansDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; +/** + * @export + */ +export const PortalPlansGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; +/** + * @export + */ +export const PortalPlansPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; +/** + * @export + */ +export const PortalPlansPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts new file mode 100644 index 000000000..b4f1682ae --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts @@ -0,0 +1,184 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcCreatePortalApplicationPostRequest, +} from '../models/index'; +import { + RpcCreatePortalApplicationPostRequestFromJSON, + RpcCreatePortalApplicationPostRequestToJSON, +} from '../models/index'; + +export interface RpcCreatePortalApplicationGetRequest { + pPortalAccountId: string; + pPortalUserId: string; + pPortalApplicationName?: string; + pEmoji?: string; + pPortalApplicationUserLimit?: number; + pPortalApplicationUserLimitInterval?: string; + pPortalApplicationUserLimitRps?: number; + pPortalApplicationDescription?: string; + pFavoriteServiceIds?: string; + pSecretKeyRequired?: string; +} + +export interface RpcCreatePortalApplicationPostOperationRequest { + rpcCreatePortalApplicationPostRequest: RpcCreatePortalApplicationPostRequest; + prefer?: RpcCreatePortalApplicationPostOperationPreferEnum; +} + +/** + * + */ +export class RpcCreatePortalApplicationApi extends runtime.BaseAPI { + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationGetRaw(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['pPortalAccountId'] == null) { + throw new runtime.RequiredError( + 'pPortalAccountId', + 'Required parameter "pPortalAccountId" was null or undefined when calling rpcCreatePortalApplicationGet().' + ); + } + + if (requestParameters['pPortalUserId'] == null) { + throw new runtime.RequiredError( + 'pPortalUserId', + 'Required parameter "pPortalUserId" was null or undefined when calling rpcCreatePortalApplicationGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['pPortalAccountId'] != null) { + queryParameters['p_portal_account_id'] = requestParameters['pPortalAccountId']; + } + + if (requestParameters['pPortalUserId'] != null) { + queryParameters['p_portal_user_id'] = requestParameters['pPortalUserId']; + } + + if (requestParameters['pPortalApplicationName'] != null) { + queryParameters['p_portal_application_name'] = requestParameters['pPortalApplicationName']; + } + + if (requestParameters['pEmoji'] != null) { + queryParameters['p_emoji'] = requestParameters['pEmoji']; + } + + if (requestParameters['pPortalApplicationUserLimit'] != null) { + queryParameters['p_portal_application_user_limit'] = requestParameters['pPortalApplicationUserLimit']; + } + + if (requestParameters['pPortalApplicationUserLimitInterval'] != null) { + queryParameters['p_portal_application_user_limit_interval'] = requestParameters['pPortalApplicationUserLimitInterval']; + } + + if (requestParameters['pPortalApplicationUserLimitRps'] != null) { + queryParameters['p_portal_application_user_limit_rps'] = requestParameters['pPortalApplicationUserLimitRps']; + } + + if (requestParameters['pPortalApplicationDescription'] != null) { + queryParameters['p_portal_application_description'] = requestParameters['pPortalApplicationDescription']; + } + + if (requestParameters['pFavoriteServiceIds'] != null) { + queryParameters['p_favorite_service_ids'] = requestParameters['pFavoriteServiceIds']; + } + + if (requestParameters['pSecretKeyRequired'] != null) { + queryParameters['p_secret_key_required'] = requestParameters['pSecretKeyRequired']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/create_portal_application`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationGet(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcCreatePortalApplicationGetRaw(requestParameters, initOverrides); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationPostRaw(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcCreatePortalApplicationPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcCreatePortalApplicationPostRequest', + 'Required parameter "rpcCreatePortalApplicationPostRequest" was null or undefined when calling rpcCreatePortalApplicationPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/create_portal_application`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcCreatePortalApplicationPostRequestToJSON(requestParameters['rpcCreatePortalApplicationPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationPost(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcCreatePortalApplicationPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcCreatePortalApplicationPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcCreatePortalApplicationPostOperationPreferEnum = typeof RpcCreatePortalApplicationPostOperationPreferEnum[keyof typeof RpcCreatePortalApplicationPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts b/portal-db/sdk/typescript/src/apis/RpcMeApi.ts new file mode 100644 index 000000000..a8fdafb41 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcMeApi.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +export interface RpcMePostRequest { + body: object; + prefer?: RpcMePostPreferEnum; +} + +/** + * + */ +export class RpcMeApi extends runtime.BaseAPI { + + /** + */ + async rpcMeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/me`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcMeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcMeGetRaw(initOverrides); + } + + /** + */ + async rpcMePostRaw(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling rpcMePost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/me`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcMePost(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcMePostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcMePostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcMePostPreferEnum = typeof RpcMePostPreferEnum[keyof typeof RpcMePostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts new file mode 100644 index 000000000..9e4f193fc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceEndpoints, +} from '../models/index'; +import { + ServiceEndpointsFromJSON, + ServiceEndpointsToJSON, +} from '../models/index'; + +export interface ServiceEndpointsDeleteRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsDeletePreferEnum; +} + +export interface ServiceEndpointsGetRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceEndpointsGetPreferEnum; +} + +export interface ServiceEndpointsPatchRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsPatchPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +export interface ServiceEndpointsPostRequest { + select?: string; + prefer?: ServiceEndpointsPostPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +/** + * + */ +export class ServiceEndpointsApi extends runtime.BaseAPI { + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceEndpointsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; +/** + * @export + */ +export const ServiceEndpointsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts new file mode 100644 index 000000000..1a5f43ac7 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceFallbacks, +} from '../models/index'; +import { + ServiceFallbacksFromJSON, + ServiceFallbacksToJSON, +} from '../models/index'; + +export interface ServiceFallbacksDeleteRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksDeletePreferEnum; +} + +export interface ServiceFallbacksGetRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceFallbacksGetPreferEnum; +} + +export interface ServiceFallbacksPatchRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksPatchPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +export interface ServiceFallbacksPostRequest { + select?: string; + prefer?: ServiceFallbacksPostPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +/** + * + */ +export class ServiceFallbacksApi extends runtime.BaseAPI { + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceFallbacksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; +/** + * @export + */ +export const ServiceFallbacksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts new file mode 100644 index 000000000..953eda314 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServicesApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Services, +} from '../models/index'; +import { + ServicesFromJSON, + ServicesToJSON, +} from '../models/index'; + +export interface ServicesDeleteRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesDeletePreferEnum; +} + +export interface ServicesGetRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServicesGetPreferEnum; +} + +export interface ServicesPatchRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesPatchPreferEnum; + services?: Services; +} + +export interface ServicesPostRequest { + select?: string; + prefer?: ServicesPostPreferEnum; + services?: Services; +} + +/** + * + */ +export class ServicesApi extends runtime.BaseAPI { + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.servicesGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServicesDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; +/** + * @export + */ +export const ServicesGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; +/** + * @export + */ +export const ServicesPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; +/** + * @export + */ +export const ServicesPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts new file mode 100644 index 000000000..3e7698705 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './ApplicationsApi'; +export * from './GatewaysApi'; +export * from './IntrospectionApi'; +export * from './NetworksApi'; +export * from './OrganizationsApi'; +export * from './PortalAccountsApi'; +export * from './PortalApplicationsApi'; +export * from './PortalPlansApi'; +export * from './RpcCreatePortalApplicationApi'; +export * from './RpcMeApi'; +export * from './ServiceEndpointsApi'; +export * from './ServiceFallbacksApi'; +export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts new file mode 100644 index 000000000..bebe8bbbe --- /dev/null +++ b/portal-db/sdk/typescript/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Applications.ts b/portal-db/sdk/typescript/src/models/Applications.ts new file mode 100644 index 000000000..036376484 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Applications.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Onchain applications for processing relays through the network + * @export + * @interface Applications + */ +export interface Applications { + /** + * Blockchain address of the application + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Applications + */ + applicationAddress: string; + /** + * Note: + * This is a Foreign Key to `gateways.gateway_address`. + * @type {string} + * @memberof Applications + */ + gatewayAddress: string; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof Applications + */ + serviceId: string; + /** + * + * @type {number} + * @memberof Applications + */ + stakeAmount?: number; + /** + * + * @type {string} + * @memberof Applications + */ + stakeDenom?: string; + /** + * + * @type {string} + * @memberof Applications + */ + applicationPrivateKeyHex?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Applications + */ + networkId: string; + /** + * + * @type {string} + * @memberof Applications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Applications + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Applications interface. + */ +export function instanceOfApplications(value: object): value is Applications { + if (!('applicationAddress' in value) || value['applicationAddress'] === undefined) return false; + if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function ApplicationsFromJSON(json: any): Applications { + return ApplicationsFromJSONTyped(json, false); +} + +export function ApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Applications { + if (json == null) { + return json; + } + return { + + 'applicationAddress': json['application_address'], + 'gatewayAddress': json['gateway_address'], + 'serviceId': json['service_id'], + 'stakeAmount': json['stake_amount'] == null ? undefined : json['stake_amount'], + 'stakeDenom': json['stake_denom'] == null ? undefined : json['stake_denom'], + 'applicationPrivateKeyHex': json['application_private_key_hex'] == null ? undefined : json['application_private_key_hex'], + 'networkId': json['network_id'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ApplicationsToJSON(json: any): Applications { + return ApplicationsToJSONTyped(json, false); +} + +export function ApplicationsToJSONTyped(value?: Applications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'application_address': value['applicationAddress'], + 'gateway_address': value['gatewayAddress'], + 'service_id': value['serviceId'], + 'stake_amount': value['stakeAmount'], + 'stake_denom': value['stakeDenom'], + 'application_private_key_hex': value['applicationPrivateKeyHex'], + 'network_id': value['networkId'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Gateways.ts b/portal-db/sdk/typescript/src/models/Gateways.ts new file mode 100644 index 000000000..7c713aed1 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Gateways.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Onchain gateway information including stake and network details + * @export + * @interface Gateways + */ +export interface Gateways { + /** + * Blockchain address of the gateway + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Gateways + */ + gatewayAddress: string; + /** + * Amount of tokens staked by the gateway + * @type {number} + * @memberof Gateways + */ + stakeAmount: number; + /** + * + * @type {string} + * @memberof Gateways + */ + stakeDenom: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Gateways + */ + networkId: string; + /** + * + * @type {string} + * @memberof Gateways + */ + gatewayPrivateKeyHex?: string; + /** + * + * @type {string} + * @memberof Gateways + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Gateways + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Gateways interface. + */ +export function instanceOfGateways(value: object): value is Gateways { + if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; + if (!('stakeAmount' in value) || value['stakeAmount'] === undefined) return false; + if (!('stakeDenom' in value) || value['stakeDenom'] === undefined) return false; + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function GatewaysFromJSON(json: any): Gateways { + return GatewaysFromJSONTyped(json, false); +} + +export function GatewaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gateways { + if (json == null) { + return json; + } + return { + + 'gatewayAddress': json['gateway_address'], + 'stakeAmount': json['stake_amount'], + 'stakeDenom': json['stake_denom'], + 'networkId': json['network_id'], + 'gatewayPrivateKeyHex': json['gateway_private_key_hex'] == null ? undefined : json['gateway_private_key_hex'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function GatewaysToJSON(json: any): Gateways { + return GatewaysToJSONTyped(json, false); +} + +export function GatewaysToJSONTyped(value?: Gateways | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'gateway_address': value['gatewayAddress'], + 'stake_amount': value['stakeAmount'], + 'stake_denom': value['stakeDenom'], + 'network_id': value['networkId'], + 'gateway_private_key_hex': value['gatewayPrivateKeyHex'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts new file mode 100644 index 000000000..8ff34b54a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Networks.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + * @export + * @interface Networks + */ +export interface Networks { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Networks + */ + networkId: string; +} + +/** + * Check if a given object implements the Networks interface. + */ +export function instanceOfNetworks(value: object): value is Networks { + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function NetworksFromJSON(json: any): Networks { + return NetworksFromJSONTyped(json, false); +} + +export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { + if (json == null) { + return json; + } + return { + + 'networkId': json['network_id'], + }; +} + +export function NetworksToJSON(json: any): Networks { + return NetworksToJSONTyped(json, false); +} + +export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'network_id': value['networkId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts new file mode 100644 index 000000000..3c35c6a79 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Organizations.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Companies or customer groups that can be attached to Portal Accounts + * @export + * @interface Organizations + */ +export interface Organizations { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof Organizations + */ + organizationId: number; + /** + * Name of the organization + * @type {string} + * @memberof Organizations + */ + organizationName: string; + /** + * Soft delete timestamp + * @type {string} + * @memberof Organizations + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Organizations interface. + */ +export function instanceOfOrganizations(value: object): value is Organizations { + if (!('organizationId' in value) || value['organizationId'] === undefined) return false; + if (!('organizationName' in value) || value['organizationName'] === undefined) return false; + return true; +} + +export function OrganizationsFromJSON(json: any): Organizations { + return OrganizationsFromJSONTyped(json, false); +} + +export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { + if (json == null) { + return json; + } + return { + + 'organizationId': json['organization_id'], + 'organizationName': json['organization_name'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function OrganizationsToJSON(json: any): Organizations { + return OrganizationsToJSONTyped(json, false); +} + +export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'organization_id': value['organizationId'], + 'organization_name': value['organizationName'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts new file mode 100644 index 000000000..ee2b80517 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccounts.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Multi-tenant accounts with plans and billing integration + * @export + * @interface PortalAccounts + */ +export interface PortalAccounts { + /** + * Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalAccounts + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `organizations.organization_id`. + * @type {number} + * @memberof PortalAccounts + */ + organizationId?: number; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalAccounts + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + userAccountName?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + internalAccountName?: string; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + billingType?: string; + /** + * Stripe subscription identifier for billing + * @type {string} + * @memberof PortalAccounts + */ + stripeSubscriptionId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpAccountId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalAccountsPortalAccountUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalAccounts interface. + */ +export function instanceOfPortalAccounts(value: object): value is PortalAccounts { + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalAccountsFromJSON(json: any): PortalAccounts { + return PortalAccountsFromJSONTyped(json, false); +} + +export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'], + 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], + 'portalPlanType': json['portal_plan_type'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], + 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], + 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalAccountsToJSON(json: any): PortalAccounts { + return PortalAccountsToJSONTyped(json, false); +} + +export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'organization_id': value['organizationId'], + 'portal_plan_type': value['portalPlanType'], + 'user_account_name': value['userAccountName'], + 'internal_account_name': value['internalAccountName'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], + 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], + 'billing_type': value['billingType'], + 'stripe_subscription_id': value['stripeSubscriptionId'], + 'gcp_account_id': value['gcpAccountId'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts new file mode 100644 index 000000000..08c5953bc --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplications.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Applications created within portal accounts with their own rate limits and settings + * @export + * @interface PortalApplications + */ +export interface PortalApplications { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalApplications + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalApplications + */ + portalAccountId: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationName?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + emoji?: string; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationDescription?: string; + /** + * + * @type {Array} + * @memberof PortalApplications + */ + favoriteServiceIds?: Array; + /** + * Hashed secret key for application authentication + * @type {string} + * @memberof PortalApplications + */ + secretKeyHash?: string; + /** + * + * @type {boolean} + * @memberof PortalApplications + */ + secretKeyRequired?: boolean; + /** + * + * @type {string} + * @memberof PortalApplications + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalApplications interface. + */ +export function instanceOfPortalApplications(value: object): value is PortalApplications { + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + return true; +} + +export function PortalApplicationsFromJSON(json: any): PortalApplications { + return PortalApplicationsFromJSONTyped(json, false); +} + +export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { + if (json == null) { + return json; + } + return { + + 'portalApplicationId': json['portal_application_id'], + 'portalAccountId': json['portal_account_id'], + 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], + 'emoji': json['emoji'] == null ? undefined : json['emoji'], + 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], + 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], + 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], + 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], + 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], + 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], + 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationsToJSON(json: any): PortalApplications { + return PortalApplicationsToJSONTyped(json, false); +} + +export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_application_id': value['portalApplicationId'], + 'portal_account_id': value['portalAccountId'], + 'portal_application_name': value['portalApplicationName'], + 'emoji': value['emoji'], + 'portal_application_user_limit': value['portalApplicationUserLimit'], + 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], + 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], + 'portal_application_description': value['portalApplicationDescription'], + 'favorite_service_ids': value['favoriteServiceIds'], + 'secret_key_hash': value['secretKeyHash'], + 'secret_key_required': value['secretKeyRequired'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts new file mode 100644 index 000000000..d89b2b209 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalPlans.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available subscription plans for Portal Accounts + * @export + * @interface PortalPlans + */ +export interface PortalPlans { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalPlans + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalPlans + */ + portalPlanTypeDescription?: string; + /** + * Maximum usage allowed within the interval + * @type {number} + * @memberof PortalPlans + */ + planUsageLimit?: number; + /** + * + * @type {string} + * @memberof PortalPlans + */ + planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; + /** + * Rate limit in requests per second + * @type {number} + * @memberof PortalPlans + */ + planRateLimitRps?: number; + /** + * + * @type {number} + * @memberof PortalPlans + */ + planApplicationLimit?: number; +} + + +/** + * @export + */ +export const PortalPlansPlanUsageLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalPlans interface. + */ +export function instanceOfPortalPlans(value: object): value is PortalPlans { + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalPlansFromJSON(json: any): PortalPlans { + return PortalPlansFromJSONTyped(json, false); +} + +export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { + if (json == null) { + return json; + } + return { + + 'portalPlanType': json['portal_plan_type'], + 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], + 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], + 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], + 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], + 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], + }; +} + +export function PortalPlansToJSON(json: any): PortalPlans { + return PortalPlansToJSONTyped(json, false); +} + +export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_plan_type': value['portalPlanType'], + 'portal_plan_type_description': value['portalPlanTypeDescription'], + 'plan_usage_limit': value['planUsageLimit'], + 'plan_usage_limit_interval': value['planUsageLimitInterval'], + 'plan_rate_limit_rps': value['planRateLimitRps'], + 'plan_application_limit': value['planApplicationLimit'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts new file mode 100644 index 000000000..df5aa2c30 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + * Validates user membership in the account before creation. + * Returns the application details including the generated secret key. + * This function is exposed via PostgREST as POST /rpc/create_portal_application + * @export + * @interface RpcCreatePortalApplicationPostRequest + */ +export interface RpcCreatePortalApplicationPostRequest { + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pEmoji?: string; + /** + * + * @type {Array} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pFavoriteServiceIds?: Array; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalAccountId: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationDescription?: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationName?: string; + /** + * + * @type {number} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimitInterval?: string; + /** + * + * @type {number} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalUserId: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pSecretKeyRequired?: string; +} + +/** + * Check if a given object implements the RpcCreatePortalApplicationPostRequest interface. + */ +export function instanceOfRpcCreatePortalApplicationPostRequest(value: object): value is RpcCreatePortalApplicationPostRequest { + if (!('pPortalAccountId' in value) || value['pPortalAccountId'] === undefined) return false; + if (!('pPortalUserId' in value) || value['pPortalUserId'] === undefined) return false; + return true; +} + +export function RpcCreatePortalApplicationPostRequestFromJSON(json: any): RpcCreatePortalApplicationPostRequest { + return RpcCreatePortalApplicationPostRequestFromJSONTyped(json, false); +} + +export function RpcCreatePortalApplicationPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcCreatePortalApplicationPostRequest { + if (json == null) { + return json; + } + return { + + 'pEmoji': json['p_emoji'] == null ? undefined : json['p_emoji'], + 'pFavoriteServiceIds': json['p_favorite_service_ids'] == null ? undefined : json['p_favorite_service_ids'], + 'pPortalAccountId': json['p_portal_account_id'], + 'pPortalApplicationDescription': json['p_portal_application_description'] == null ? undefined : json['p_portal_application_description'], + 'pPortalApplicationName': json['p_portal_application_name'] == null ? undefined : json['p_portal_application_name'], + 'pPortalApplicationUserLimit': json['p_portal_application_user_limit'] == null ? undefined : json['p_portal_application_user_limit'], + 'pPortalApplicationUserLimitInterval': json['p_portal_application_user_limit_interval'] == null ? undefined : json['p_portal_application_user_limit_interval'], + 'pPortalApplicationUserLimitRps': json['p_portal_application_user_limit_rps'] == null ? undefined : json['p_portal_application_user_limit_rps'], + 'pPortalUserId': json['p_portal_user_id'], + 'pSecretKeyRequired': json['p_secret_key_required'] == null ? undefined : json['p_secret_key_required'], + }; +} + +export function RpcCreatePortalApplicationPostRequestToJSON(json: any): RpcCreatePortalApplicationPostRequest { + return RpcCreatePortalApplicationPostRequestToJSONTyped(json, false); +} + +export function RpcCreatePortalApplicationPostRequestToJSONTyped(value?: RpcCreatePortalApplicationPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'p_emoji': value['pEmoji'], + 'p_favorite_service_ids': value['pFavoriteServiceIds'], + 'p_portal_account_id': value['pPortalAccountId'], + 'p_portal_application_description': value['pPortalApplicationDescription'], + 'p_portal_application_name': value['pPortalApplicationName'], + 'p_portal_application_user_limit': value['pPortalApplicationUserLimit'], + 'p_portal_application_user_limit_interval': value['pPortalApplicationUserLimitInterval'], + 'p_portal_application_user_limit_rps': value['pPortalApplicationUserLimitRps'], + 'p_portal_user_id': value['pPortalUserId'], + 'p_secret_key_required': value['pSecretKeyRequired'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts new file mode 100644 index 000000000..516acad4a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available endpoint types for each service + * @export + * @interface ServiceEndpoints + */ +export interface ServiceEndpoints { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceEndpoints + */ + endpointId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceEndpoints + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + endpointType?: ServiceEndpointsEndpointTypeEnum; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const ServiceEndpointsEndpointTypeEnum = { + CometBft: 'cometBFT', + Cosmos: 'cosmos', + Rest: 'REST', + JsonRpc: 'JSON-RPC', + Wss: 'WSS', + GRpc: 'gRPC' +} as const; +export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; + + +/** + * Check if a given object implements the ServiceEndpoints interface. + */ +export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { + if (!('endpointId' in value) || value['endpointId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + return true; +} + +export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { + return ServiceEndpointsFromJSONTyped(json, false); +} + +export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { + if (json == null) { + return json; + } + return { + + 'endpointId': json['endpoint_id'], + 'serviceId': json['service_id'], + 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { + return ServiceEndpointsToJSONTyped(json, false); +} + +export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'endpoint_id': value['endpointId'], + 'service_id': value['serviceId'], + 'endpoint_type': value['endpointType'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts new file mode 100644 index 000000000..a10559ad2 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Fallback URLs for services when primary endpoints fail + * @export + * @interface ServiceFallbacks + */ +export interface ServiceFallbacks { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceFallbacks + */ + serviceFallbackId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceFallbacks + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + fallbackUrl: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the ServiceFallbacks interface. + */ +export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { + if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; + return true; +} + +export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { + return ServiceFallbacksFromJSONTyped(json, false); +} + +export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { + if (json == null) { + return json; + } + return { + + 'serviceFallbackId': json['service_fallback_id'], + 'serviceId': json['service_id'], + 'fallbackUrl': json['fallback_url'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { + return ServiceFallbacksToJSONTyped(json, false); +} + +export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_fallback_id': value['serviceFallbackId'], + 'service_id': value['serviceId'], + 'fallback_url': value['fallbackUrl'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts new file mode 100644 index 000000000..c9341fcdb --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Services.ts @@ -0,0 +1,182 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain services from the Pocket Network + * @export + * @interface Services + */ +export interface Services { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Services + */ + serviceId: string; + /** + * + * @type {string} + * @memberof Services + */ + serviceName: string; + /** + * Cost in compute units for each relay + * @type {number} + * @memberof Services + */ + computeUnitsPerRelay?: number; + /** + * Valid domains for this service + * @type {Array} + * @memberof Services + */ + serviceDomains: Array; + /** + * + * @type {string} + * @memberof Services + */ + serviceOwnerAddress?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Services + */ + networkId?: string; + /** + * + * @type {boolean} + * @memberof Services + */ + active?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + beta?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + comingSoon?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + qualityFallbackEnabled?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + hardFallbackEnabled?: boolean; + /** + * + * @type {string} + * @memberof Services + */ + svgIcon?: string; + /** + * + * @type {string} + * @memberof Services + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Services interface. + */ +export function instanceOfServices(value: object): value is Services { + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('serviceName' in value) || value['serviceName'] === undefined) return false; + if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; + return true; +} + +export function ServicesFromJSON(json: any): Services { + return ServicesFromJSONTyped(json, false); +} + +export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { + if (json == null) { + return json; + } + return { + + 'serviceId': json['service_id'], + 'serviceName': json['service_name'], + 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], + 'serviceDomains': json['service_domains'], + 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], + 'networkId': json['network_id'] == null ? undefined : json['network_id'], + 'active': json['active'] == null ? undefined : json['active'], + 'beta': json['beta'] == null ? undefined : json['beta'], + 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], + 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], + 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], + 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServicesToJSON(json: any): Services { + return ServicesToJSONTyped(json, false); +} + +export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_id': value['serviceId'], + 'service_name': value['serviceName'], + 'compute_units_per_relay': value['computeUnitsPerRelay'], + 'service_domains': value['serviceDomains'], + 'service_owner_address': value['serviceOwnerAddress'], + 'network_id': value['networkId'], + 'active': value['active'], + 'beta': value['beta'], + 'coming_soon': value['comingSoon'], + 'quality_fallback_enabled': value['qualityFallbackEnabled'], + 'hard_fallback_enabled': value['hardFallbackEnabled'], + 'svg_icon': value['svgIcon'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts new file mode 100644 index 000000000..eda1454eb --- /dev/null +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './Applications'; +export * from './Gateways'; +export * from './Networks'; +export * from './Organizations'; +export * from './PortalAccounts'; +export * from './PortalApplications'; +export * from './PortalPlans'; +export * from './RpcCreatePortalApplicationPostRequest'; +export * from './ServiceEndpoints'; +export * from './ServiceFallbacks'; +export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts new file mode 100644 index 000000000..f4d9fba5c --- /dev/null +++ b/portal-db/sdk/typescript/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json index 9d976fb4d..4567ec198 100644 --- a/portal-db/sdk/typescript/tsconfig.json +++ b/portal-db/sdk/typescript/tsconfig.json @@ -1,19 +1,20 @@ { "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "lib": ["ES2020", "DOM"], - "moduleResolution": "Bundler", - "noUncheckedIndexedAccess": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, "declaration": true, - "declarationMap": true, - "outDir": "./dist" + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] }, - "include": ["types.d.ts", "index.ts"], - "exclude": ["node_modules", "dist"] + "exclude": [ + "dist", + "node_modules" + ] } diff --git a/portal-db/sdk/typescript/types.d.ts b/portal-db/sdk/typescript/types.d.ts deleted file mode 100644 index ee42919b7..000000000 --- a/portal-db/sdk/typescript/types.d.ts +++ /dev/null @@ -1,2439 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - "/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** OpenAPI description (this document) */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/service_fallbacks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Fallback URLs for services when primary endpoints fail */ - get: { - parameters: { - query?: { - service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; - service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; - fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; - created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["service_fallbacks"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"][]; - "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"][]; - "text/csv": components["schemas"]["service_fallbacks"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Fallback URLs for services when primary endpoints fail */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["service_fallbacks"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Fallback URLs for services when primary endpoints fail */ - delete: { - parameters: { - query?: { - service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; - service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; - fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; - created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Fallback URLs for services when primary endpoints fail */ - patch: { - parameters: { - query?: { - service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; - service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; - fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; - created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["service_fallbacks"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/portal_plans": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Available subscription plans for Portal Accounts */ - get: { - parameters: { - query?: { - portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; - portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; - /** @description Maximum usage allowed within the interval */ - plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; - plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; - /** @description Rate limit in requests per second */ - plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; - plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["portal_plans"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"][]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"][]; - "text/csv": components["schemas"]["portal_plans"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Available subscription plans for Portal Accounts */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_plans"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Available subscription plans for Portal Accounts */ - delete: { - parameters: { - query?: { - portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; - portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; - /** @description Maximum usage allowed within the interval */ - plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; - plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; - /** @description Rate limit in requests per second */ - plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; - plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Available subscription plans for Portal Accounts */ - patch: { - parameters: { - query?: { - portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; - portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; - /** @description Maximum usage allowed within the interval */ - plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; - plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; - /** @description Rate limit in requests per second */ - plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; - plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_plans"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/applications": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Onchain applications for processing relays through the network */ - get: { - parameters: { - query?: { - /** @description Blockchain address of the application */ - application_address?: components["parameters"]["rowFilter.applications.application_address"]; - gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; - service_id?: components["parameters"]["rowFilter.applications.service_id"]; - stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; - application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; - network_id?: components["parameters"]["rowFilter.applications.network_id"]; - created_at?: components["parameters"]["rowFilter.applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["applications"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["applications"][]; - "application/vnd.pgrst.object+json": components["schemas"]["applications"][]; - "text/csv": components["schemas"]["applications"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Onchain applications for processing relays through the network */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["applications"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Onchain applications for processing relays through the network */ - delete: { - parameters: { - query?: { - /** @description Blockchain address of the application */ - application_address?: components["parameters"]["rowFilter.applications.application_address"]; - gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; - service_id?: components["parameters"]["rowFilter.applications.service_id"]; - stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; - application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; - network_id?: components["parameters"]["rowFilter.applications.network_id"]; - created_at?: components["parameters"]["rowFilter.applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Onchain applications for processing relays through the network */ - patch: { - parameters: { - query?: { - /** @description Blockchain address of the application */ - application_address?: components["parameters"]["rowFilter.applications.application_address"]; - gateway_address?: components["parameters"]["rowFilter.applications.gateway_address"]; - service_id?: components["parameters"]["rowFilter.applications.service_id"]; - stake_amount?: components["parameters"]["rowFilter.applications.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.applications.stake_denom"]; - application_private_key_hex?: components["parameters"]["rowFilter.applications.application_private_key_hex"]; - network_id?: components["parameters"]["rowFilter.applications.network_id"]; - created_at?: components["parameters"]["rowFilter.applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.applications.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["applications"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/portal_applications": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Applications created within portal accounts with their own rate limits and settings */ - get: { - parameters: { - query?: { - portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; - portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; - portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; - emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; - portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; - portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; - portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; - portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; - favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; - /** @description Hashed secret key for application authentication */ - secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; - secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; - deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["portal_applications"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"][]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"][]; - "text/csv": components["schemas"]["portal_applications"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Applications created within portal accounts with their own rate limits and settings */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_applications"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Applications created within portal accounts with their own rate limits and settings */ - delete: { - parameters: { - query?: { - portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; - portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; - portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; - emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; - portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; - portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; - portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; - portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; - favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; - /** @description Hashed secret key for application authentication */ - secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; - secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; - deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Applications created within portal accounts with their own rate limits and settings */ - patch: { - parameters: { - query?: { - portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; - portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; - portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; - emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; - portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; - portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; - portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; - portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; - favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; - /** @description Hashed secret key for application authentication */ - secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; - secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; - deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_applications"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/services": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Supported blockchain services from the Pocket Network */ - get: { - parameters: { - query?: { - service_id?: components["parameters"]["rowFilter.services.service_id"]; - service_name?: components["parameters"]["rowFilter.services.service_name"]; - /** @description Cost in compute units for each relay */ - compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; - /** @description Valid domains for this service */ - service_domains?: components["parameters"]["rowFilter.services.service_domains"]; - service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; - network_id?: components["parameters"]["rowFilter.services.network_id"]; - active?: components["parameters"]["rowFilter.services.active"]; - beta?: components["parameters"]["rowFilter.services.beta"]; - coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; - quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; - hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; - svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; - deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; - created_at?: components["parameters"]["rowFilter.services.created_at"]; - updated_at?: components["parameters"]["rowFilter.services.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["services"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"][]; - "application/vnd.pgrst.object+json": components["schemas"]["services"][]; - "text/csv": components["schemas"]["services"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Supported blockchain services from the Pocket Network */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["services"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Supported blockchain services from the Pocket Network */ - delete: { - parameters: { - query?: { - service_id?: components["parameters"]["rowFilter.services.service_id"]; - service_name?: components["parameters"]["rowFilter.services.service_name"]; - /** @description Cost in compute units for each relay */ - compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; - /** @description Valid domains for this service */ - service_domains?: components["parameters"]["rowFilter.services.service_domains"]; - service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; - network_id?: components["parameters"]["rowFilter.services.network_id"]; - active?: components["parameters"]["rowFilter.services.active"]; - beta?: components["parameters"]["rowFilter.services.beta"]; - coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; - quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; - hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; - svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; - deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; - created_at?: components["parameters"]["rowFilter.services.created_at"]; - updated_at?: components["parameters"]["rowFilter.services.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Supported blockchain services from the Pocket Network */ - patch: { - parameters: { - query?: { - service_id?: components["parameters"]["rowFilter.services.service_id"]; - service_name?: components["parameters"]["rowFilter.services.service_name"]; - /** @description Cost in compute units for each relay */ - compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; - /** @description Valid domains for this service */ - service_domains?: components["parameters"]["rowFilter.services.service_domains"]; - service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; - network_id?: components["parameters"]["rowFilter.services.network_id"]; - active?: components["parameters"]["rowFilter.services.active"]; - beta?: components["parameters"]["rowFilter.services.beta"]; - coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; - quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; - hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; - svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; - deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; - created_at?: components["parameters"]["rowFilter.services.created_at"]; - updated_at?: components["parameters"]["rowFilter.services.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["services"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/portal_accounts": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Multi-tenant accounts with plans and billing integration */ - get: { - parameters: { - query?: { - /** @description Unique identifier for the portal account */ - portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; - organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; - portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; - user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; - internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; - portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; - portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; - portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; - billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; - /** @description Stripe subscription identifier for billing */ - stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; - gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; - gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; - deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["portal_accounts"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"][]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"][]; - "text/csv": components["schemas"]["portal_accounts"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Multi-tenant accounts with plans and billing integration */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_accounts"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Multi-tenant accounts with plans and billing integration */ - delete: { - parameters: { - query?: { - /** @description Unique identifier for the portal account */ - portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; - organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; - portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; - user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; - internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; - portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; - portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; - portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; - billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; - /** @description Stripe subscription identifier for billing */ - stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; - gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; - gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; - deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Multi-tenant accounts with plans and billing integration */ - patch: { - parameters: { - query?: { - /** @description Unique identifier for the portal account */ - portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; - organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; - portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; - user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; - internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; - portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; - portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; - portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; - billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; - /** @description Stripe subscription identifier for billing */ - stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; - gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; - gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; - deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; - created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; - updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["portal_accounts"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Companies or customer groups that can be attached to Portal Accounts */ - get: { - parameters: { - query?: { - organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; - /** @description Name of the organization */ - organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; - /** @description Soft delete timestamp */ - deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; - created_at?: components["parameters"]["rowFilter.organizations.created_at"]; - updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["organizations"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"][]; - "application/vnd.pgrst.object+json": components["schemas"]["organizations"][]; - "text/csv": components["schemas"]["organizations"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Companies or customer groups that can be attached to Portal Accounts */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["organizations"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Companies or customer groups that can be attached to Portal Accounts */ - delete: { - parameters: { - query?: { - organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; - /** @description Name of the organization */ - organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; - /** @description Soft delete timestamp */ - deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; - created_at?: components["parameters"]["rowFilter.organizations.created_at"]; - updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Companies or customer groups that can be attached to Portal Accounts */ - patch: { - parameters: { - query?: { - organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; - /** @description Name of the organization */ - organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; - /** @description Soft delete timestamp */ - deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; - created_at?: components["parameters"]["rowFilter.organizations.created_at"]; - updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["organizations"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/networks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ - get: { - parameters: { - query?: { - network_id?: components["parameters"]["rowFilter.networks.network_id"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["networks"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"][]; - "application/vnd.pgrst.object+json": components["schemas"]["networks"][]; - "text/csv": components["schemas"]["networks"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["networks"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ - delete: { - parameters: { - query?: { - network_id?: components["parameters"]["rowFilter.networks.network_id"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ - patch: { - parameters: { - query?: { - network_id?: components["parameters"]["rowFilter.networks.network_id"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["networks"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/gateways": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Onchain gateway information including stake and network details */ - get: { - parameters: { - query?: { - /** @description Blockchain address of the gateway */ - gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; - /** @description Amount of tokens staked by the gateway */ - stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; - network_id?: components["parameters"]["rowFilter.gateways.network_id"]; - gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; - created_at?: components["parameters"]["rowFilter.gateways.created_at"]; - updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["gateways"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["gateways"][]; - "application/vnd.pgrst.object+json": components["schemas"]["gateways"][]; - "text/csv": components["schemas"]["gateways"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Onchain gateway information including stake and network details */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["gateways"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Onchain gateway information including stake and network details */ - delete: { - parameters: { - query?: { - /** @description Blockchain address of the gateway */ - gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; - /** @description Amount of tokens staked by the gateway */ - stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; - network_id?: components["parameters"]["rowFilter.gateways.network_id"]; - gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; - created_at?: components["parameters"]["rowFilter.gateways.created_at"]; - updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Onchain gateway information including stake and network details */ - patch: { - parameters: { - query?: { - /** @description Blockchain address of the gateway */ - gateway_address?: components["parameters"]["rowFilter.gateways.gateway_address"]; - /** @description Amount of tokens staked by the gateway */ - stake_amount?: components["parameters"]["rowFilter.gateways.stake_amount"]; - stake_denom?: components["parameters"]["rowFilter.gateways.stake_denom"]; - network_id?: components["parameters"]["rowFilter.gateways.network_id"]; - gateway_private_key_hex?: components["parameters"]["rowFilter.gateways.gateway_private_key_hex"]; - created_at?: components["parameters"]["rowFilter.gateways.created_at"]; - updated_at?: components["parameters"]["rowFilter.gateways.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["gateways"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/service_endpoints": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Available endpoint types for each service */ - get: { - parameters: { - query?: { - endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; - service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; - endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; - created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - /** @description Ordering */ - order?: components["parameters"]["order"]; - /** @description Limiting and Pagination */ - offset?: components["parameters"]["offset"]; - /** @description Limiting and Pagination */ - limit?: components["parameters"]["limit"]; - }; - header?: { - /** @description Limiting and Pagination */ - Range?: components["parameters"]["range"]; - /** @description Limiting and Pagination */ - "Range-Unit"?: components["parameters"]["rangeUnit"]; - /** @description Preference */ - Prefer?: components["parameters"]["preferCount"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["service_endpoints"][]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"][]; - "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"][]; - "text/csv": components["schemas"]["service_endpoints"][]; - }; - }; - /** @description Partial Content */ - 206: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** Available endpoint types for each service */ - post: { - parameters: { - query?: { - /** @description Filtering Columns */ - select?: components["parameters"]["select"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferPost"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["service_endpoints"]; - responses: { - /** @description Created */ - 201: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Available endpoint types for each service */ - delete: { - parameters: { - query?: { - endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; - service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; - endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; - created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - options?: never; - head?: never; - /** Available endpoint types for each service */ - patch: { - parameters: { - query?: { - endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; - service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; - endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; - created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; - updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; - }; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferReturn"]; - }; - path?: never; - cookie?: never; - }; - requestBody?: components["requestBodies"]["service_endpoints"]; - responses: { - /** @description No Content */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - trace?: never; - }; - "/rpc/me": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post: { - parameters: { - query?: never; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferParams"]; - }; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": Record; - "application/vnd.pgrst.object+json;nulls=stripped": Record; - "application/vnd.pgrst.object+json": Record; - "text/csv": Record; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/rpc/create_portal_application": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - * @description Validates user membership in the account before creation. - * Returns the application details including the generated secret key. - * This function is exposed via PostgREST as POST /rpc/create_portal_application - */ - get: { - parameters: { - query: { - p_portal_account_id: string; - p_portal_user_id: string; - p_portal_application_name?: string; - p_emoji?: string; - p_portal_application_user_limit?: number; - p_portal_application_user_limit_interval?: string; - p_portal_application_user_limit_rps?: number; - p_portal_application_description?: string; - p_favorite_service_ids?: string; - p_secret_key_required?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - /** - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - * @description Validates user membership in the account before creation. - * Returns the application details including the generated secret key. - * This function is exposed via PostgREST as POST /rpc/create_portal_application - */ - post: { - parameters: { - query?: never; - header?: { - /** @description Preference */ - Prefer?: components["parameters"]["preferParams"]; - }; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** Format: character varying */ - p_emoji?: string; - /** Format: character varying[] */ - p_favorite_service_ids?: string[]; - /** Format: character varying */ - p_portal_account_id: string; - /** Format: character varying */ - p_portal_application_description?: string; - /** Format: character varying */ - p_portal_application_name?: string; - /** Format: integer */ - p_portal_application_user_limit?: number; - /** Format: plan_interval */ - p_portal_application_user_limit_interval?: string; - /** Format: integer */ - p_portal_application_user_limit_rps?: number; - /** Format: character varying */ - p_portal_user_id: string; - /** Format: text */ - p_secret_key_required?: string; - }; - "application/vnd.pgrst.object+json;nulls=stripped": { - /** Format: character varying */ - p_emoji?: string; - /** Format: character varying[] */ - p_favorite_service_ids?: string[]; - /** Format: character varying */ - p_portal_account_id: string; - /** Format: character varying */ - p_portal_application_description?: string; - /** Format: character varying */ - p_portal_application_name?: string; - /** Format: integer */ - p_portal_application_user_limit?: number; - /** Format: plan_interval */ - p_portal_application_user_limit_interval?: string; - /** Format: integer */ - p_portal_application_user_limit_rps?: number; - /** Format: character varying */ - p_portal_user_id: string; - /** Format: text */ - p_secret_key_required?: string; - }; - "application/vnd.pgrst.object+json": { - /** Format: character varying */ - p_emoji?: string; - /** Format: character varying[] */ - p_favorite_service_ids?: string[]; - /** Format: character varying */ - p_portal_account_id: string; - /** Format: character varying */ - p_portal_application_description?: string; - /** Format: character varying */ - p_portal_application_name?: string; - /** Format: integer */ - p_portal_application_user_limit?: number; - /** Format: plan_interval */ - p_portal_application_user_limit_interval?: string; - /** Format: integer */ - p_portal_application_user_limit_rps?: number; - /** Format: character varying */ - p_portal_user_id: string; - /** Format: text */ - p_secret_key_required?: string; - }; - "text/csv": { - /** Format: character varying */ - p_emoji?: string; - /** Format: character varying[] */ - p_favorite_service_ids?: string[]; - /** Format: character varying */ - p_portal_account_id: string; - /** Format: character varying */ - p_portal_application_description?: string; - /** Format: character varying */ - p_portal_application_name?: string; - /** Format: integer */ - p_portal_application_user_limit?: number; - /** Format: plan_interval */ - p_portal_application_user_limit_interval?: string; - /** Format: integer */ - p_portal_application_user_limit_rps?: number; - /** Format: character varying */ - p_portal_user_id: string; - /** Format: text */ - p_secret_key_required?: string; - }; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; -} -export type webhooks = Record; -export interface components { - schemas: { - /** @description Fallback URLs for services when primary endpoints fail */ - service_fallbacks: { - /** - * Format: integer - * @description Note: - * This is a Primary Key. - */ - service_fallback_id: number; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `services.service_id`. - */ - service_id: string; - /** Format: character varying */ - fallback_url: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Available subscription plans for Portal Accounts */ - portal_plans: { - /** - * Format: character varying - * @description Note: - * This is a Primary Key. - */ - portal_plan_type: string; - /** Format: character varying */ - portal_plan_type_description?: string; - /** - * Format: integer - * @description Maximum usage allowed within the interval - */ - plan_usage_limit?: number; - /** - * Format: public.plan_interval - * @enum {string} - */ - plan_usage_limit_interval?: "day" | "month" | "year"; - /** - * Format: integer - * @description Rate limit in requests per second - */ - plan_rate_limit_rps?: number; - /** Format: integer */ - plan_application_limit?: number; - }; - /** @description Onchain applications for processing relays through the network */ - applications: { - /** - * Format: character varying - * @description Blockchain address of the application - * - * Note: - * This is a Primary Key. - */ - application_address: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `gateways.gateway_address`. - */ - gateway_address: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `services.service_id`. - */ - service_id: string; - /** Format: bigint */ - stake_amount?: number; - /** Format: character varying */ - stake_denom?: string; - /** Format: character varying */ - application_private_key_hex?: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `networks.network_id`. - */ - network_id: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Applications created within portal accounts with their own rate limits and settings */ - portal_applications: { - /** - * Format: character varying - * @description Note: - * This is a Primary Key. - * @default gen_random_uuid() - */ - portal_application_id: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - */ - portal_account_id: string; - /** Format: character varying */ - portal_application_name?: string; - /** Format: character varying */ - emoji?: string; - /** Format: integer */ - portal_application_user_limit?: number; - /** - * Format: public.plan_interval - * @enum {string} - */ - portal_application_user_limit_interval?: "day" | "month" | "year"; - /** Format: integer */ - portal_application_user_limit_rps?: number; - /** Format: character varying */ - portal_application_description?: string; - /** Format: character varying[] */ - favorite_service_ids?: string[]; - /** - * Format: character varying - * @description Hashed secret key for application authentication - */ - secret_key_hash?: string; - /** @default false */ - secret_key_required: boolean; - /** Format: timestamp with time zone */ - deleted_at?: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Supported blockchain services from the Pocket Network */ - services: { - /** - * Format: character varying - * @description Note: - * This is a Primary Key. - */ - service_id: string; - /** Format: character varying */ - service_name: string; - /** - * Format: integer - * @description Cost in compute units for each relay - */ - compute_units_per_relay?: number; - /** - * Format: character varying[] - * @description Valid domains for this service - */ - service_domains: string[]; - /** Format: character varying */ - service_owner_address?: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `networks.network_id`. - */ - network_id?: string; - /** @default false */ - active: boolean; - /** @default false */ - beta: boolean; - /** @default false */ - coming_soon: boolean; - /** @default false */ - quality_fallback_enabled: boolean; - /** @default false */ - hard_fallback_enabled: boolean; - /** Format: text */ - svg_icon?: string; - /** Format: timestamp with time zone */ - deleted_at?: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Multi-tenant accounts with plans and billing integration */ - portal_accounts: { - /** - * Format: character varying - * @description Unique identifier for the portal account - * - * Note: - * This is a Primary Key. - * @default gen_random_uuid() - */ - portal_account_id: string; - /** - * Format: integer - * @description Note: - * This is a Foreign Key to `organizations.organization_id`. - */ - organization_id?: number; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - */ - portal_plan_type: string; - /** Format: character varying */ - user_account_name?: string; - /** Format: character varying */ - internal_account_name?: string; - /** Format: integer */ - portal_account_user_limit?: number; - /** - * Format: public.plan_interval - * @enum {string} - */ - portal_account_user_limit_interval?: "day" | "month" | "year"; - /** Format: integer */ - portal_account_user_limit_rps?: number; - /** Format: character varying */ - billing_type?: string; - /** - * Format: character varying - * @description Stripe subscription identifier for billing - */ - stripe_subscription_id?: string; - /** Format: character varying */ - gcp_account_id?: string; - /** Format: character varying */ - gcp_entitlement_id?: string; - /** Format: timestamp with time zone */ - deleted_at?: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Companies or customer groups that can be attached to Portal Accounts */ - organizations: { - /** - * Format: integer - * @description Note: - * This is a Primary Key. - */ - organization_id: number; - /** - * Format: character varying - * @description Name of the organization - */ - organization_name: string; - /** - * Format: timestamp with time zone - * @description Soft delete timestamp - */ - deleted_at?: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Supported blockchain networks (Pocket mainnet, testnet, etc.) */ - networks: { - /** - * Format: character varying - * @description Note: - * This is a Primary Key. - */ - network_id: string; - }; - /** @description Onchain gateway information including stake and network details */ - gateways: { - /** - * Format: character varying - * @description Blockchain address of the gateway - * - * Note: - * This is a Primary Key. - */ - gateway_address: string; - /** - * Format: bigint - * @description Amount of tokens staked by the gateway - */ - stake_amount: number; - /** Format: character varying */ - stake_denom: string; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `networks.network_id`. - */ - network_id: string; - /** Format: character varying */ - gateway_private_key_hex?: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - /** @description Available endpoint types for each service */ - service_endpoints: { - /** - * Format: integer - * @description Note: - * This is a Primary Key. - */ - endpoint_id: number; - /** - * Format: character varying - * @description Note: - * This is a Foreign Key to `services.service_id`. - */ - service_id: string; - /** - * Format: public.endpoint_type - * @enum {string} - */ - endpoint_type?: "cometBFT" | "cosmos" | "REST" | "JSON-RPC" | "WSS" | "gRPC"; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - created_at: string; - /** - * Format: timestamp with time zone - * @default CURRENT_TIMESTAMP - */ - updated_at: string; - }; - }; - responses: never; - parameters: { - /** @description Preference */ - preferParams: "params=single-object"; - /** @description Preference */ - preferReturn: "return=representation" | "return=minimal" | "return=none"; - /** @description Preference */ - preferCount: "count=none"; - /** @description Preference */ - preferPost: "return=representation" | "return=minimal" | "return=none" | "resolution=ignore-duplicates" | "resolution=merge-duplicates"; - /** @description Filtering Columns */ - select: string; - /** @description On Conflict */ - on_conflict: string; - /** @description Ordering */ - order: string; - /** @description Limiting and Pagination */ - range: string; - /** @description Limiting and Pagination */ - rangeUnit: string; - /** @description Limiting and Pagination */ - offset: string; - /** @description Limiting and Pagination */ - limit: string; - "rowFilter.service_fallbacks.service_fallback_id": string; - "rowFilter.service_fallbacks.service_id": string; - "rowFilter.service_fallbacks.fallback_url": string; - "rowFilter.service_fallbacks.created_at": string; - "rowFilter.service_fallbacks.updated_at": string; - "rowFilter.portal_plans.portal_plan_type": string; - "rowFilter.portal_plans.portal_plan_type_description": string; - /** @description Maximum usage allowed within the interval */ - "rowFilter.portal_plans.plan_usage_limit": string; - "rowFilter.portal_plans.plan_usage_limit_interval": string; - /** @description Rate limit in requests per second */ - "rowFilter.portal_plans.plan_rate_limit_rps": string; - "rowFilter.portal_plans.plan_application_limit": string; - /** @description Blockchain address of the application */ - "rowFilter.applications.application_address": string; - "rowFilter.applications.gateway_address": string; - "rowFilter.applications.service_id": string; - "rowFilter.applications.stake_amount": string; - "rowFilter.applications.stake_denom": string; - "rowFilter.applications.application_private_key_hex": string; - "rowFilter.applications.network_id": string; - "rowFilter.applications.created_at": string; - "rowFilter.applications.updated_at": string; - "rowFilter.portal_applications.portal_application_id": string; - "rowFilter.portal_applications.portal_account_id": string; - "rowFilter.portal_applications.portal_application_name": string; - "rowFilter.portal_applications.emoji": string; - "rowFilter.portal_applications.portal_application_user_limit": string; - "rowFilter.portal_applications.portal_application_user_limit_interval": string; - "rowFilter.portal_applications.portal_application_user_limit_rps": string; - "rowFilter.portal_applications.portal_application_description": string; - "rowFilter.portal_applications.favorite_service_ids": string; - /** @description Hashed secret key for application authentication */ - "rowFilter.portal_applications.secret_key_hash": string; - "rowFilter.portal_applications.secret_key_required": string; - "rowFilter.portal_applications.deleted_at": string; - "rowFilter.portal_applications.created_at": string; - "rowFilter.portal_applications.updated_at": string; - "rowFilter.services.service_id": string; - "rowFilter.services.service_name": string; - /** @description Cost in compute units for each relay */ - "rowFilter.services.compute_units_per_relay": string; - /** @description Valid domains for this service */ - "rowFilter.services.service_domains": string; - "rowFilter.services.service_owner_address": string; - "rowFilter.services.network_id": string; - "rowFilter.services.active": string; - "rowFilter.services.beta": string; - "rowFilter.services.coming_soon": string; - "rowFilter.services.quality_fallback_enabled": string; - "rowFilter.services.hard_fallback_enabled": string; - "rowFilter.services.svg_icon": string; - "rowFilter.services.deleted_at": string; - "rowFilter.services.created_at": string; - "rowFilter.services.updated_at": string; - /** @description Unique identifier for the portal account */ - "rowFilter.portal_accounts.portal_account_id": string; - "rowFilter.portal_accounts.organization_id": string; - "rowFilter.portal_accounts.portal_plan_type": string; - "rowFilter.portal_accounts.user_account_name": string; - "rowFilter.portal_accounts.internal_account_name": string; - "rowFilter.portal_accounts.portal_account_user_limit": string; - "rowFilter.portal_accounts.portal_account_user_limit_interval": string; - "rowFilter.portal_accounts.portal_account_user_limit_rps": string; - "rowFilter.portal_accounts.billing_type": string; - /** @description Stripe subscription identifier for billing */ - "rowFilter.portal_accounts.stripe_subscription_id": string; - "rowFilter.portal_accounts.gcp_account_id": string; - "rowFilter.portal_accounts.gcp_entitlement_id": string; - "rowFilter.portal_accounts.deleted_at": string; - "rowFilter.portal_accounts.created_at": string; - "rowFilter.portal_accounts.updated_at": string; - "rowFilter.organizations.organization_id": string; - /** @description Name of the organization */ - "rowFilter.organizations.organization_name": string; - /** @description Soft delete timestamp */ - "rowFilter.organizations.deleted_at": string; - "rowFilter.organizations.created_at": string; - "rowFilter.organizations.updated_at": string; - "rowFilter.networks.network_id": string; - /** @description Blockchain address of the gateway */ - "rowFilter.gateways.gateway_address": string; - /** @description Amount of tokens staked by the gateway */ - "rowFilter.gateways.stake_amount": string; - "rowFilter.gateways.stake_denom": string; - "rowFilter.gateways.network_id": string; - "rowFilter.gateways.gateway_private_key_hex": string; - "rowFilter.gateways.created_at": string; - "rowFilter.gateways.updated_at": string; - "rowFilter.service_endpoints.endpoint_id": string; - "rowFilter.service_endpoints.service_id": string; - "rowFilter.service_endpoints.endpoint_type": string; - "rowFilter.service_endpoints.created_at": string; - "rowFilter.service_endpoints.updated_at": string; - }; - requestBodies: { - /** @description portal_accounts */ - portal_accounts: { - content: { - "application/json": components["schemas"]["portal_accounts"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"]; - "text/csv": components["schemas"]["portal_accounts"]; - }; - }; - /** @description networks */ - networks: { - content: { - "application/json": components["schemas"]["networks"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"]; - "application/vnd.pgrst.object+json": components["schemas"]["networks"]; - "text/csv": components["schemas"]["networks"]; - }; - }; - /** @description gateways */ - gateways: { - content: { - "application/json": components["schemas"]["gateways"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["gateways"]; - "application/vnd.pgrst.object+json": components["schemas"]["gateways"]; - "text/csv": components["schemas"]["gateways"]; - }; - }; - /** @description service_endpoints */ - service_endpoints: { - content: { - "application/json": components["schemas"]["service_endpoints"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"]; - "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"]; - "text/csv": components["schemas"]["service_endpoints"]; - }; - }; - /** @description portal_applications */ - portal_applications: { - content: { - "application/json": components["schemas"]["portal_applications"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"]; - "text/csv": components["schemas"]["portal_applications"]; - }; - }; - /** @description service_fallbacks */ - service_fallbacks: { - content: { - "application/json": components["schemas"]["service_fallbacks"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"]; - "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"]; - "text/csv": components["schemas"]["service_fallbacks"]; - }; - }; - /** @description portal_plans */ - portal_plans: { - content: { - "application/json": components["schemas"]["portal_plans"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"]; - "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"]; - "text/csv": components["schemas"]["portal_plans"]; - }; - }; - /** @description applications */ - applications: { - content: { - "application/json": components["schemas"]["applications"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["applications"]; - "application/vnd.pgrst.object+json": components["schemas"]["applications"]; - "text/csv": components["schemas"]["applications"]; - }; - }; - /** @description services */ - services: { - content: { - "application/json": components["schemas"]["services"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"]; - "application/vnd.pgrst.object+json": components["schemas"]["services"]; - "text/csv": components["schemas"]["services"]; - }; - }; - /** @description organizations */ - organizations: { - content: { - "application/json": components["schemas"]["organizations"]; - "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"]; - "application/vnd.pgrst.object+json": components["schemas"]["organizations"]; - "text/csv": components["schemas"]["organizations"]; - }; - }; - }; - headers: never; - pathItems: never; -} -export type $defs = Record; -export type operations = Record; From 8e2a00cabf98bcbb359b63553f738c1c37c72d09 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 26 Sep 2025 16:25:34 +0100 Subject: [PATCH 17/43] update sdks after pulling main --- portal-db/sdk/typescript/.openapi-generator-ignore | 3 +++ portal-db/sdk/typescript/.openapi-generator/FILES | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore index 7484ee590..884649821 100644 --- a/portal-db/sdk/typescript/.openapi-generator-ignore +++ b/portal-db/sdk/typescript/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +# Ignore README.md to preserve custom documentation +README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES index 87944a7ee..69e5bde07 100644 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -1,7 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore -README.md package.json src/apis/ApplicationsApi.ts src/apis/GatewaysApi.ts From af9ead1f1bca8e5dd73649047944e011a13e7f58 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 26 Sep 2025 20:07:30 +0100 Subject: [PATCH 18/43] add production pg dump --- .gitignore | 3 + portal-db/Makefile | 14 ++ portal-db/scripts/hydrate-prod.sh | 229 ++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) create mode 100755 portal-db/scripts/hydrate-prod.sh diff --git a/.gitignore b/.gitignore index f8f94ffdc..4b7331d08 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,6 @@ install.log # Supplier Report JSON File # Generated by ./e2e/scripts/shannon-preliminary-services-test.sh supplier_report_*.json + +# Portal DB +pg_dump.sql \ No newline at end of file diff --git a/portal-db/Makefile b/portal-db/Makefile index 55eca4792..ffe18250c 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -84,6 +84,10 @@ gen-jwt: ## Generate JWT token fi cd api/scripts && ./gen-jwt.sh +reset-dev-db: ## Reset the development database + @echo "๐Ÿ”„ Resetting database..." + rm -rf ./tmp/portal_db_data + # ============================================================================ # DATA HYDRATION # ============================================================================ @@ -143,3 +147,13 @@ hydrate-gateways: ## Hydrate gateways table from blockchain data exit 1; \ fi DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" GATEWAY_ADDRESSES="$(GATEWAY_ADDRESSES)" ./scripts/hydrate-gateways.sh + +hydrate-prod: ## Hydrate local database with production data + @echo "๐Ÿญ Hydrating local database with production data..." + @echo " Note: Requires .env file with production database credentials" + @if ! docker ps | grep -q portal-db; then \ + echo "โŒ Portal DB is not running. Please start it first:"; \ + echo " make postgrest-up"; \ + exit 1; \ + fi + ./scripts/hydrate-prod.sh diff --git a/portal-db/scripts/hydrate-prod.sh b/portal-db/scripts/hydrate-prod.sh new file mode 100755 index 000000000..1d016df00 --- /dev/null +++ b/portal-db/scripts/hydrate-prod.sh @@ -0,0 +1,229 @@ +#!/bin/bash + +# PostgreSQL dump script for remote database +# This script creates a local pg_dump from a remote PostgreSQL database + +set -e + +# Configuration file path +ENV_FILE="$(dirname "$0")/../.env" +PG_DUMP_FILE="$(dirname "$0")/../pg_dump.sql" + +# Check if .env file exists +if [ ! -f "$ENV_FILE" ]; then + echo -e "${RED}โŒ .env file not found at: $ENV_FILE${NC}" + echo "" + echo "Please create a .env file with all required variables." + exit 1 +fi + +# Load environment variables from .env file +echo "๐Ÿ“‹ Loading configuration from .env file..." +set -a # Automatically export all variables +source "$ENV_FILE" +set +a # Turn off automatic export + +# Validate required environment variables +REQUIRED_VARS=("REMOTE_HOST" "DATABASE" "USERNAME" "PASSWORD" "SSL_ROOT_CERT" "SSL_CERT" "SSL_KEY" "DOCKER_CONTAINER" "LOCAL_DATABASE" "LOCAL_DB_USER") + +for var in "${REQUIRED_VARS[@]}"; do + if [ -z "${!var}" ]; then + echo -e "${RED}โŒ Required environment variable '$var' is not set in .env file${NC}" + exit 1 + fi +done + +echo -e "${GREEN}โœ… All required environment variables loaded${NC}" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +echo -e "${BLUE}๐Ÿ—„๏ธ PostgreSQL Remote Database Dump${NC}" +echo "========================================" +echo -e "${BLUE}Remote Host:${NC} $REMOTE_HOST" +echo -e "${BLUE}Database:${NC} $DATABASE" +echo -e "${BLUE}Username:${NC} $USERNAME" +echo -e "${BLUE}Output File:${NC} $PG_DUMP_FILE" +echo "" + +# Clean up any existing dump file +if [ -f "$PG_DUMP_FILE" ]; then + echo -e "${YELLOW}๐Ÿงน Cleaning previous dump file...${NC}" + rm -f "$PG_DUMP_FILE" + echo -e "${GREEN}โœ… Previous dump file removed${NC}" +fi + +# Check if pg_dump is available +if ! command -v pg_dump >/dev/null 2>&1; then + echo -e "${RED}โŒ pg_dump is not installed${NC}" + echo " Install PostgreSQL client tools:" + echo " - Mac: brew install postgresql" + echo " - Ubuntu: sudo apt-get install postgresql-client" + exit 1 +fi + +echo -e "${GREEN}โœ… pg_dump is available: $(pg_dump --version)${NC}" + +# Check if SSL certificates exist +if [ ! -f "$SSL_ROOT_CERT" ]; then + echo -e "${RED}โŒ SSL root certificate not found: $SSL_ROOT_CERT${NC}" + exit 1 +fi + +if [ ! -f "$SSL_CERT" ]; then + echo -e "${RED}โŒ SSL client certificate not found: $SSL_CERT${NC}" + exit 1 +fi + +if [ ! -f "$SSL_KEY" ]; then + echo -e "${RED}โŒ SSL client key not found: $SSL_KEY${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… SSL certificates found:${NC}" +echo " Root CA: $SSL_ROOT_CERT" +echo " Client Cert: $SSL_CERT" +echo " Client Key: $SSL_KEY" + +# Check and fix SSL key permissions (PostgreSQL requires 0600 or stricter) +KEY_PERMS=$(stat -f "%Lp" "$SSL_KEY" 2>/dev/null || stat -c "%a" "$SSL_KEY" 2>/dev/null) +if [ "$KEY_PERMS" != "600" ]; then + echo -e "${YELLOW}โš ๏ธ Fixing SSL key permissions (current: $KEY_PERMS, required: 600)${NC}" + chmod 600 "$SSL_KEY" + if [ $? -eq 0 ]; then + echo -e "${GREEN}โœ… SSL key permissions fixed${NC}" + else + echo -e "${RED}โŒ Failed to fix SSL key permissions. Please run: chmod 600 $SSL_KEY${NC}" + exit 1 + fi +else + echo -e "${GREEN}โœ… SSL key permissions correct (600)${NC}" +fi + +# Create output directory if it doesn't exist +OUTPUT_DIR=$(dirname "$PG_DUMP_FILE") +mkdir -p "$OUTPUT_DIR" + +# Set password environment variable to avoid prompting +export PGPASSWORD="$PASSWORD" + +echo "" +echo -e "${YELLOW}๐Ÿš€ Starting database dump...${NC}" +echo " This may take several minutes depending on database size" + +# Set SSL environment variables for PostgreSQL client +export PGSSLMODE="verify-ca" +export PGSSLCERT="$SSL_CERT" +export PGSSLKEY="$SSL_KEY" +export PGSSLROOTCERT="$SSL_ROOT_CERT" + +# Perform the dump in plain SQL format - DATA ONLY from public schema only +echo -e "${BLUE}๐Ÿ“ฅ Dumping database (data only - public schema)...${NC}" +if pg_dump \ + --host="$REMOTE_HOST" \ + --port=5432 \ + --username="$USERNAME" \ + --dbname="$DATABASE" \ + --format=plain \ + --verbose \ + --no-password \ + --file="$PG_DUMP_FILE" \ + --schema=public \ + --exclude-table-data='audit.*' \ + --exclude-table-data='logs.*' \ + --no-owner \ + --no-privileges \ + --data-only \ + --inserts; then + + echo "" + echo -e "${GREEN}โœ… Database dump completed successfully!${NC}" + + # Display file information + if [ -f "$PG_DUMP_FILE" ]; then + FILE_SIZE=$(ls -lh "$PG_DUMP_FILE" | awk '{print $5}') + echo -e "${BLUE}๐Ÿ“Š Dump Information:${NC}" + echo " File: $PG_DUMP_FILE" + echo " Size: $FILE_SIZE" + echo " Format: Plain SQL - DATA ONLY (public schema)" + echo " Schema required: YES (assumes target schema exists)" + echo " Ready for auto-restore: Yes" + echo "" + echo -e "${BLUE}๐Ÿ“š Usage Instructions:${NC}" + echo " ๐Ÿ’ก Recommended: Use the Makefile target for easier execution:" + echo " make hydrate-prod" + echo "" + echo " โš ๏ธ IMPORTANT: Target database schema must already exist!" + echo " Ensure PostgreSQL and PostgREST are running first: make postgrest-up" + echo "" + echo " Manual restore (if needed):" + echo " psql --host=localhost --port=5435 --username=postgres --dbname=portal_db < $PG_DUMP_FILE" + fi + +else + echo "" + echo -e "${RED}โŒ Database dump failed${NC}" + echo " Check the connection parameters and credentials" + exit 1 +fi + +# Clear sensitive environment variables +unset PGPASSWORD +unset PGSSLMODE +unset PGSSLCERT +unset PGSSLKEY +unset PGSSLROOTCERT + +echo "" +echo -e "${GREEN}๐ŸŽ‰ Dump process completed!${NC}" + +# ============================================================================ +# AUTOMATIC DATABASE IMPORT +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿš€ Starting automatic database import...${NC}" + +# Check if dump file exists and has content +if [ ! -f "$PG_DUMP_FILE" ] || [ ! -s "$PG_DUMP_FILE" ]; then + echo -e "${RED}โŒ Dump file not found or empty, skipping import${NC}" + exit 1 +fi + +# Check if Docker container is running +if ! docker ps --format "table {{.Names}}" | grep -q "^$DOCKER_CONTAINER$"; then + echo -e "${RED}โŒ Docker container '$DOCKER_CONTAINER' is not running${NC}" + echo " Please start PostgreSQL and PostgREST services first:" + echo " make postgrest-up" + echo "" + echo " Or manually: docker compose up -d" + exit 1 +fi + +echo -e "${BLUE}๐Ÿ“ฅ Importing data to local PostgreSQL container...${NC}" + +# Import data with suppressed output, only show result +if cat "$PG_DUMP_FILE" | docker exec -i "$DOCKER_CONTAINER" psql -U "$LOCAL_DB_USER" -d "$LOCAL_DATABASE" >/dev/null 2>&1; then + echo -e "${GREEN}โœ… Database import completed successfully!${NC}" + + # Show import summary + RECORD_COUNT=$(docker exec "$DOCKER_CONTAINER" psql -U "$LOCAL_DB_USER" -d "$LOCAL_DATABASE" -t -c "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE';" 2>/dev/null | xargs) + echo -e "${BLUE}๐Ÿ“Š Import Summary:${NC}" + echo " Tables imported: $RECORD_COUNT public schema tables" + echo " Container: $DOCKER_CONTAINER" + echo " Database: $LOCAL_DATABASE" + echo " Access: localhost:5435" + +else + echo -e "${RED}โŒ Database import failed${NC}" + echo " Check Docker container status and database connectivity" + echo " Manual import: cat $PG_DUMP_FILE | docker exec -i $DOCKER_CONTAINER psql -U $LOCAL_DB_USER -d $LOCAL_DATABASE" + exit 1 +fi + +echo "" +echo -e "${GREEN}๐ŸŽ‰ Complete! Production data is now available locally.${NC}" From 1f3e0c5452c416de7edb285b561cff8e39f169bc Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 26 Sep 2025 20:09:17 +0100 Subject: [PATCH 19/43] check port docker container --- portal-db/scripts/hydrate-prod.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/portal-db/scripts/hydrate-prod.sh b/portal-db/scripts/hydrate-prod.sh index 1d016df00..7f3881902 100755 --- a/portal-db/scripts/hydrate-prod.sh +++ b/portal-db/scripts/hydrate-prod.sh @@ -9,6 +9,14 @@ set -e ENV_FILE="$(dirname "$0")/../.env" PG_DUMP_FILE="$(dirname "$0")/../pg_dump.sql" +# Check if Docker container is running +if ! docker ps --format "table {{.Names}}" | grep -q "^$DOCKER_CONTAINER$"; then + echo -e "${RED}โŒ Docker container '$DOCKER_CONTAINER' is not running${NC}" + echo " Please start PostgreSQL and PostgREST services first:" + echo " make postgrest-up" + exit 1 +fi + # Check if .env file exists if [ ! -f "$ENV_FILE" ]; then echo -e "${RED}โŒ .env file not found at: $ENV_FILE${NC}" @@ -194,16 +202,6 @@ if [ ! -f "$PG_DUMP_FILE" ] || [ ! -s "$PG_DUMP_FILE" ]; then exit 1 fi -# Check if Docker container is running -if ! docker ps --format "table {{.Names}}" | grep -q "^$DOCKER_CONTAINER$"; then - echo -e "${RED}โŒ Docker container '$DOCKER_CONTAINER' is not running${NC}" - echo " Please start PostgreSQL and PostgREST services first:" - echo " make postgrest-up" - echo "" - echo " Or manually: docker compose up -d" - exit 1 -fi - echo -e "${BLUE}๐Ÿ“ฅ Importing data to local PostgreSQL container...${NC}" # Import data with suppressed output, only show result From b9af0730be5bb88a220fe1d13f92e1595d1ad54f Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Sun, 28 Sep 2025 20:12:41 -0700 Subject: [PATCH 20/43] Minor nits before leaving comments --- portal-db/Makefile | 22 ++++++++++++++++----- portal-db/README.md | 28 +++++++++++++-------------- portal-db/api/README.md | 43 +++++++++++++++++++++++++++-------------- 3 files changed, 60 insertions(+), 33 deletions(-) diff --git a/portal-db/Makefile b/portal-db/Makefile index ffe18250c..c6304cd1e 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -1,14 +1,10 @@ # Portal DB API Makefile -# Provides convenient commands for managing the PostgREST API - -.PHONY: postgrest-up postgrest-down postgrest-logs -.PHONY: generate-openapi generate-sdks generate-all test-auth test-portal-app -.PHONY: hydrate-testdata hydrate-services hydrate-applications hydrate-gateways # ============================================================================ # SERVICE MANAGEMENT # ============================================================================ +.PHONY: postgrest-up postgrest-up: ## Start PostgREST API service and PostgreSQL DB @echo "๐Ÿš€ Starting Portal DB API services..." docker compose up -d @@ -16,14 +12,17 @@ postgrest-up: ## Start PostgREST API service and PostgreSQL DB @echo " PostgreSQL DB: localhost:5435" @echo " PostgREST API: http://localhost:3000" +.PHONY: postgrest-down postgrest-down: ## Stop PostgREST API service and PostgreSQL DB @echo "๐Ÿ›‘ Stopping Portal DB API services..." docker compose down @echo "โœ… Services stopped!" +.PHONY: postgrest-logs postgrest-logs: ## Show logs from PostgREST API service and PostgreSQL DB docker compose logs -f +.PHONY: portal-db-up portal-db-up: ## Start Portal DB PostgreSQL container only @echo "๐Ÿš€ Starting Portal DB PostgreSQL container..." docker compose up -d portal-db @@ -32,6 +31,7 @@ portal-db-up: ## Start Portal DB PostgreSQL container only @echo " User: postgres" @echo " Password: portal_password" +.PHONY: portal-db-down portal-db-down: ## Stop Portal DB PostgreSQL container only @echo "๐Ÿ›‘ Stopping Portal DB PostgreSQL container..." docker compose down portal-db @@ -41,15 +41,18 @@ portal-db-down: ## Stop Portal DB PostgreSQL container only # API GENERATION # ============================================================================ +.PHONY: generate-openapi generate-openapi: ## Generate OpenAPI specification from PostgREST @echo "๐Ÿ“ Generating OpenAPI specification..." cd api/codegen && ./generate-openapi.sh +.PHONY: generate-sdks generate-sdks: ## Generate Go SDK from OpenAPI spec @echo "๐Ÿ”ง Generating Go SDK..." @echo " Note: Requires Node.js and oapi-codegen" cd api/codegen && ./generate-sdks.sh +.PHONY: generate-all generate-all: generate-openapi generate-sdks ## Generate OpenAPI spec and Go SDK @echo "โœจ All generation tasks completed!" @@ -57,6 +60,7 @@ generate-all: generate-openapi generate-sdks ## Generate OpenAPI spec and Go SDK # AUTHENTICATION & TESTING # ============================================================================ +.PHONY: test-auth test-auth: ## Test JWT authentication flow @echo "๐Ÿ” Testing JWT authentication..." @if ! docker ps | grep -q portal-db-api; then \ @@ -66,6 +70,7 @@ test-auth: ## Test JWT authentication flow fi cd api/scripts && ./test-auth.sh +.PHONY: test-portal-app test-portal-app: ## Test portal application creation and retrieval @echo "๐Ÿงช Testing portal application creation..." @if ! docker ps | grep -q portal-db-api; then \ @@ -75,6 +80,7 @@ test-portal-app: ## Test portal application creation and retrieval fi cd api/scripts && ./test-portal-app-creation.sh +.PHONY: gen-jwt gen-jwt: ## Generate JWT token @echo "๐Ÿ”‘ Generating JWT token..." @if ! docker ps | grep -q portal-db-api; then \ @@ -84,6 +90,7 @@ gen-jwt: ## Generate JWT token fi cd api/scripts && ./gen-jwt.sh +.PHONY: reset-dev-db reset-dev-db: ## Reset the development database @echo "๐Ÿ”„ Resetting database..." rm -rf ./tmp/portal_db_data @@ -94,6 +101,7 @@ reset-dev-db: ## Reset the development database # Database connection for all hydrate scripts (matches docker-compose.yml) DB_CONNECTION_STRING := postgresql://postgres:portal_password@localhost:5435/portal_db +.PHONY: hydrate-testdata hydrate-testdata: ## Populate database with test data for development @echo "๐Ÿงช Hydrating Portal DB with test data..." @if ! docker ps | grep -q portal-db; then \ @@ -103,6 +111,7 @@ hydrate-testdata: ## Populate database with test data for development fi DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" ./scripts/hydrate-testdata.sh +.PHONY: hydrate-services hydrate-services: ## Hydrate services table from blockchain data @echo "๐ŸŒ Hydrating services table..." @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(SERVICE_IDS)" ]; then \ @@ -118,6 +127,7 @@ hydrate-services: ## Hydrate services table from blockchain data fi DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" SERVICE_IDS="$(SERVICE_IDS)" ./scripts/hydrate-services.sh +.PHONY: hydrate-applications hydrate-applications: ## Hydrate applications table from blockchain data @echo "๐Ÿ“ฑ Hydrating applications table..." @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(APPLICATION_ADDRESSES)" ]; then \ @@ -133,6 +143,7 @@ hydrate-applications: ## Hydrate applications table from blockchain data fi DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" APPLICATION_ADDRESSES="$(APPLICATION_ADDRESSES)" ./scripts/hydrate-applications.sh +.PHONY: hydrate-gateways hydrate-gateways: ## Hydrate gateways table from blockchain data @echo "๐Ÿ”— Hydrating gateways table..." @if [ -z "$(NODE)" ] || [ -z "$(NETWORK)" ] || [ -z "$(GATEWAY_ADDRESSES)" ]; then \ @@ -148,6 +159,7 @@ hydrate-gateways: ## Hydrate gateways table from blockchain data fi DB_CONNECTION_STRING="$(DB_CONNECTION_STRING)" NODE="$(NODE)" NETWORK="$(NETWORK)" GATEWAY_ADDRESSES="$(GATEWAY_ADDRESSES)" ./scripts/hydrate-gateways.sh +.PHONY: hydrate-prod hydrate-prod: ## Hydrate local database with production data @echo "๐Ÿญ Hydrating local database with production data..." @echo " Note: Requires .env file with production database credentials" diff --git a/portal-db/README.md b/portal-db/README.md index 3f94fe0cf..60bd87515 100644 --- a/portal-db/README.md +++ b/portal-db/README.md @@ -4,6 +4,19 @@ The Portal DB is the house for all core business logic for both PATH and the Por The Portal DB is a _highly opinionated_ implementation of a Postgres database that can be used to manage and administer both PATH and a UI on top of PATH. +## Table of Contents + +- [๐ŸŒ REST API Access](#-rest-api-access) +- [๐Ÿ’ป REST API Client SDKs](#-rest-api-client-sdks) +- [Quickstart (for Grove Engineering)](#quickstart-for-grove-engineering) +- [Interacting with the database](#interacting-with-the-database) + - [`make` Targets](#make-targets) + - [`scripts`](#scripts) +- [Tools](#tools) + - [`psql` (REQUIRED)](#psql-required) + - [`dbeaver` (RECOMMENDED)](#dbeaver-recommended) + - [Claude Postgres MCP Server (EXPERIMENTAL)](#claude-postgres-mcp-server-experimental) + ## ๐ŸŒ REST API Access The Portal DB includes a **PostgREST API** that automatically generates REST endpoints from your database schema. This provides instant HTTP access to all your data with authentication, filtering, and Go SDK generation. @@ -17,25 +30,12 @@ The Portal DB includes client SDKs for both Go and TypeScript. **โžก๏ธ [View Go SDK Documentation](sdk/go/README.md)** **โžก๏ธ [View TypeScript SDK Documentation](sdk/typescript/README.md)** -:::info TODO: Revisit docs location +:::warning TODO(@olshansk): Revisit docs location Consider if this should be moved into `docusaurus/docs` so it is discoverable as part of [path.grove.city](https://path.grove.city/). ::: -## Table of Contents - -- [๐ŸŒ REST API Access](#-rest-api-access) -- [๐Ÿ’ป REST API Client SDKs](#-rest-api-client-sdks) -- [Quickstart (for Grove Engineering)](#quickstart-for-grove-engineering) -- [Interacting with the database](#interacting-with-the-database) - - [`make` Targets](#make-targets) - - [`scripts`](#scripts) -- [Tools](#tools) - - [`psql` (REQUIRED)](#psql-required) - - [`dbeaver` (RECOMMENDED)](#dbeaver-recommended) - - [Claude Postgres MCP Server (EXPERIMENTAL)](#claude-postgres-mcp-server-experimental) - ## Quickstart (for Grove Engineering) We'll connect to the following gateway and applications: diff --git a/portal-db/api/README.md b/portal-db/api/README.md index c90711a61..d30d4d334 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -2,13 +2,13 @@ -This folder contains **PostgREST configuration** and **SDK generation tools** for the Portal Database. +This folder contains **PostgREST configuration** and **SDK generation tools** for the Portal Database. PostgREST automatically creates a REST API from the Portal DB PostgreSQL database schema. -## ๐Ÿš€ Quick Start +## ๐Ÿš€ Quick Start -### 1. Start PostgREST +### 1. Start PostgREST ```bash # From portal-db directory @@ -16,12 +16,14 @@ make postgrest-up ``` This starts: + - **PostgreSQL**: Database with Portal schema - **PostgREST**: API server on http://localhost:3000 ### 2. Hydrate the database with test data Hydrate the database with test data: + ```bash make hydrate-testdata ``` @@ -82,14 +84,14 @@ networks, _ := client.GetNetworksWithResponse(context.Background(), nil) - [For Beginners](#for-beginners) - [๐Ÿ“š Resources](#-resources) - ## ๐Ÿค” What is This? **PostgREST** is a tool that reads your PostgreSQL database and automatically generates a complete REST API. No code required - it introspects your tables, views, and functions to create endpoints. **This folder provides:** + - โœ… **PostgREST Configuration**: Database connection, JWT auth, and API settings -- โœ… **JWT Authentication**: Role-based access control using database roles +- โœ… **JWT Authentication**: Role-based access control using database roles - โœ… **Go SDK Generation**: Type-safe Go client from the OpenAPI specification - โœ… **Testing Scripts**: JWT token generation and authentication testing @@ -137,7 +139,7 @@ db-uri = "postgresql://authenticator:password@postgres:5432/portal_db" db-schemas = "public,api" # Schemas to expose via API db-anon-role = "anon" # Default role for unauthenticated requests -# JWT Authentication +# JWT Authentication jwt-secret = "your-secret-key" # Secret for verifying JWT tokens jwt-role-claim-key = ".role" # JWT claim containing database role @@ -171,7 +173,7 @@ server-port = 3000 3. PostgREST Processing (happens automatically) โ”œโ”€โ”€ Verify JWT signature - โ”œโ”€โ”€ Extract 'role' claim + โ”œโ”€โ”€ Extract 'role' claim โ”œโ”€โ”€ Execute: SET ROLE ; โ””โ”€โ”€ Run query with role permissions @@ -186,6 +188,7 @@ make gen-jwt ``` **Example Output:** + ``` ๐Ÿ”‘ JWT Token Generated โœจ ๐Ÿ‘ค Role: authenticated @@ -211,12 +214,14 @@ curl -X POST -H "Authorization: Bearer $TOKEN" \ ### Permission Levels **Anonymous (`anon` role)** + - โœ… `networks` - Blockchain networks -- โœ… `services` - Available services +- โœ… `services` - Available services - โœ… `portal_plans` - Subscription plans - โŒ User accounts or private data **Authenticated (`authenticated` role)** + - โœ… All anonymous permissions - โœ… `organizations` - Organization data - โœ… `portal_accounts` - User accounts @@ -230,6 +235,7 @@ make test-auth ``` This tests: + - Anonymous access to public data - JWT token generation - Authenticated access to protected data @@ -254,6 +260,7 @@ $$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; ``` **Usage:** + ```bash curl -X POST http://localhost:3000/rpc/create_portal_application \ -H "Authorization: Bearer $TOKEN" \ @@ -261,6 +268,7 @@ curl -X POST http://localhost:3000/rpc/create_portal_application \ ``` **Test transactions:** + ```bash make test-portal-app ``` @@ -285,7 +293,7 @@ make generate-sdks # Go SDK only ``` sdk/go/ โ”œโ”€โ”€ models.go # Data types and structures (generated) -โ”œโ”€โ”€ client.go # API client and methods (generated) +โ”œโ”€โ”€ client.go # API client and methods (generated) โ”œโ”€โ”€ go.mod # Go module definition (permanent) โ””โ”€โ”€ README.md # SDK documentation (permanent) ``` @@ -293,6 +301,7 @@ sdk/go/ ### Use the Go SDK **Basic Usage:** + ```go package main @@ -307,13 +316,13 @@ func main() { if err != nil { panic(err) } - + // Get all networks networks, err := client.GetNetworksWithResponse(context.Background(), nil) if err != nil { panic(err) } - + // Print results for _, network := range *networks.JSON200 { fmt.Printf("Network: %s\n", network.NetworkId) @@ -322,6 +331,7 @@ func main() { ``` **With Authentication:** + ```go // JWT token from gen-jwt.sh token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." @@ -334,8 +344,8 @@ requestEditor := func(ctx context.Context, req *http.Request) error { // Make authenticated request accounts, err := client.GetPortalAccountsWithResponse( - context.Background(), - &portaldb.GetPortalAccountsParams{}, + context.Background(), + &portaldb.GetPortalAccountsParams{}, requestEditor, ) ``` @@ -377,22 +387,26 @@ When you modify tables or add new functions: ### Query Features Examples **Filtering:** + ```bash curl "http://localhost:3000/services?active=eq.true" curl "http://localhost:3000/services?service_name=ilike.*Ethereum*" ``` **Field Selection:** + ```bash curl "http://localhost:3000/services?select=service_id,service_name" ``` **Sorting & Pagination:** + ```bash curl "http://localhost:3000/services?order=service_name.asc&limit=10&offset=20" ``` **Joins (Resource Embedding):** + ```bash curl "http://localhost:3000/services?select=*,service_endpoints(*)" ``` @@ -402,8 +416,9 @@ For complete query syntax, see [PostgREST API Documentation](https://postgrest.o ## ๐Ÿš€ Next Steps ### For Beginners + 1. **Explore the API**: Try the curl examples above -2. **Generate SDK**: Run `make generate-all` +2. **Generate SDK**: Run `make generate-all` 3. **Read Go SDK docs**: Check `../sdk/go/README.md` 4. **Test authentication**: Run `make test-auth` 5. **Add test data**: Run `make hydrate-testdata` From ff3b37328c976574f6d4b45ab43556088466aafc Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Mon, 29 Sep 2025 18:34:02 +0100 Subject: [PATCH 21/43] fix hydrate-prod script --- portal-db/scripts/hydrate-prod.sh | 36 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/portal-db/scripts/hydrate-prod.sh b/portal-db/scripts/hydrate-prod.sh index 7f3881902..6a7dd9928 100755 --- a/portal-db/scripts/hydrate-prod.sh +++ b/portal-db/scripts/hydrate-prod.sh @@ -5,13 +5,26 @@ set -e +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + # Configuration file path ENV_FILE="$(dirname "$0")/../.env" PG_DUMP_FILE="$(dirname "$0")/../pg_dump.sql" -# Check if Docker container is running -if ! docker ps --format "table {{.Names}}" | grep -q "^$DOCKER_CONTAINER$"; then - echo -e "${RED}โŒ Docker container '$DOCKER_CONTAINER' is not running${NC}" +# Set default values for local Docker environment +DEFAULT_DOCKER_CONTAINER="portal-db" +DEFAULT_LOCAL_DATABASE="portal_db" +DEFAULT_LOCAL_DB_USER="postgres" + +# Check if Docker container is running (check default first, then .env override) +CONTAINER_TO_CHECK="${DOCKER_CONTAINER:-$DEFAULT_DOCKER_CONTAINER}" +if ! docker ps --format "table {{.Names}}" | grep -q "^$CONTAINER_TO_CHECK$"; then + echo -e "${RED}โŒ Docker container '$CONTAINER_TO_CHECK' is not running${NC}" echo " Please start PostgreSQL and PostgREST services first:" echo " make postgrest-up" exit 1 @@ -31,8 +44,13 @@ set -a # Automatically export all variables source "$ENV_FILE" set +a # Turn off automatic export +# Apply defaults for local Docker environment variables if not set in .env +DOCKER_CONTAINER="${DOCKER_CONTAINER:-$DEFAULT_DOCKER_CONTAINER}" +LOCAL_DATABASE="${LOCAL_DATABASE:-$DEFAULT_LOCAL_DATABASE}" +LOCAL_DB_USER="${LOCAL_DB_USER:-$DEFAULT_LOCAL_DB_USER}" + # Validate required environment variables -REQUIRED_VARS=("REMOTE_HOST" "DATABASE" "USERNAME" "PASSWORD" "SSL_ROOT_CERT" "SSL_CERT" "SSL_KEY" "DOCKER_CONTAINER" "LOCAL_DATABASE" "LOCAL_DB_USER") +REQUIRED_VARS=("REMOTE_HOST" "DATABASE" "USERNAME" "PASSWORD" "SSL_ROOT_CERT" "SSL_CERT" "SSL_KEY") for var in "${REQUIRED_VARS[@]}"; do if [ -z "${!var}" ]; then @@ -42,13 +60,9 @@ for var in "${REQUIRED_VARS[@]}"; do done echo -e "${GREEN}โœ… All required environment variables loaded${NC}" - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color +echo -e "${GREEN}โœ… Using Docker container: $DOCKER_CONTAINER${NC}" +echo -e "${GREEN}โœ… Using local database: $LOCAL_DATABASE${NC}" +echo -e "${GREEN}โœ… Using local DB user: $LOCAL_DB_USER${NC}" echo -e "${BLUE}๐Ÿ—„๏ธ PostgreSQL Remote Database Dump${NC}" echo "========================================" From 7a10118d58fa1682809c9dcc0525948eb5c6e51f Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 13:27:42 -0700 Subject: [PATCH 22/43] WIP review --- Makefile | 45 +- README.md | 12 + docusaurus/docusaurus.config.js | 4 +- docusaurus/package.json | 10 +- docusaurus/yarn.lock | 1190 ++++++++++++++++++++----------- local/path/values.tmpl.yaml | 4 +- portal-db/Makefile | 28 + 7 files changed, 864 insertions(+), 429 deletions(-) diff --git a/Makefile b/Makefile index 7c350fb4a..9914fb2b6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ help: ## Prints all the targets in all the Makefiles @echo "$(BOLD)$(CYAN)๐ŸŒ PATH (Path API & Toolkit Harness) Makefile Targets$(RESET)" @echo "" @echo "$(BOLD)=== ๐Ÿ“‹ Information & Discovery ===$(RESET)" - @grep -h -E '^help:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' + @grep -h -E '^(help|help-unclassified):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' @echo "" @echo "$(BOLD)=== ๐Ÿ”จ Build & Run ===$(RESET)" @grep -h -E '^path_(build|run):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' @@ -59,6 +59,49 @@ help: ## Prints all the targets in all the Makefiles @grep -h -E '^claudesync.*:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' @echo "" +.PHONY: help-unclassified +help-unclassified: ## Show all unclassified targets + @echo "" + @echo "$(BOLD)$(CYAN)๐Ÿ“ฆ Unclassified Targets$(RESET)" + @echo "" + @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ + grep -v -E '^(help|help-unclassified|portaldb-quickstart|path_build|path_run|path_up|path_down|config.*|install_tools.*|localnet_.*|load_test.*|test_unit|test_all|go_lint|e2e_test.*|bench.*|get_disqualified_endpoints|grove_get_disqualified_endpoints|shannon_preliminary_services_test_help|shannon_preliminary_services_test|source_shannon_preliminary_services_helpers|portal_db.*|proto.*|release_.*|go_docs|docusaurus.*|gen_.*_docs|test_request.*|test_healthz.*|test_disqualified.*|test_load.*|claudesync.*):.*?## .*$$' | \ + awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' + @echo "" + +.PHONY: portaldb-quickstart +portaldb-quickstart: ## Quick start guide for Portal DB (starts services, hydrates data, tests endpoints) + @echo "" + @echo "$(BOLD)$(CYAN)๐Ÿ—„๏ธ Portal DB Quick Start$(RESET)" + @echo "" + @echo "$(BOLD)Step 1: Starting Portal DB services...$(RESET)" + @cd ./portal-db && make postgrest-up + @echo "" + @echo "$(BOLD)Step 2: Hydrating test data...$(RESET)" + @cd ./portal-db && make hydrate-testdata + @echo "" + @echo "$(BOLD)Step 3: Testing public endpoint (networks)...$(RESET)" + @curl -s http://localhost:3000/networks | jq + @echo "" + @echo "$(BOLD)Step 4: Generating JWT token...$(RESET)" + @cd ./portal-db && make gen-jwt + @echo "" + @echo "$(BOLD)Step 5: Set your JWT token:$(RESET)" + @echo "$(YELLOW)export TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXV0aGVudGljYXRlZCIsImVtYWlsIjoiam9obkBkb2UuY29tIiwiZXhwIjoxNzU4MjEzNjM5fQ.i1_Mrj86xsdgsxDqLmJz8FDd9dd-sJhlS0vBQXGIHuU$(RESET)" + @echo "" + @echo "$(BOLD)Step 6: Testing authenticated endpoints...$(RESET)" + @echo "$(CYAN)Testing portal_accounts:$(RESET)" + @curl -s http://localhost:3000/portal_accounts -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXV0aGVudGljYXRlZCIsImVtYWlsIjoiam9obkBkb2UuY29tIiwiZXhwIjoxNzU4MjEzNjM5fQ.i1_Mrj86xsdgsxDqLmJz8FDd9dd-sJhlS0vBQXGIHuU" | jq + @echo "" + @echo "$(CYAN)Testing rpc/me:$(RESET)" + @curl -s http://localhost:3000/rpc/me -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXV0aGVudGljYXRlZCIsImVtYWlsIjoiam9obkBkb2UuY29tIiwiZXhwIjoxNzU4MjEzNjM5fQ.i1_Mrj86xsdgsxDqLmJz8FDd9dd-sJhlS0vBQXGIHuU" -H "Content-Type: application/json" | jq + @echo "" + @echo "$(BOLD)Step 7: Testing portal app creation...$(RESET)" + @cd ./portal-db && make test-portal-app + @echo "" + @echo "$(GREEN)$(BOLD)โœ… Quick start complete!$(RESET)" + @echo "" + ############################# #### PATH Build Targets ### ############################# diff --git a/README.md b/README.md index 155516ab0..7345b5e57 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,18 @@ For Bug Reports and Enhancement Requests, please open an [Issue](https://github. For Technical Support please open a ticket in [Grove's Discord](https://discord.gg/build-with-grove). +## Portal DB + +The portal DB is the source of truth for running a SaaS using PATH to deploy +a service similar to [Grove's Portal](https://portal.grove.city) + +See the following docs for more information: + +- [portal-db](./portal-db/README.md) +- [portal-db/api](./portal-db/api/README.md) +- [portal-db/sdk/go](./portal-db/sdk/go/README.md) +- [portal-db/sdk/typescript](./portal-db/sdk/typescript/README.md) + --- ## License diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js index bace24862..415ae0601 100644 --- a/docusaurus/docusaurus.config.js +++ b/docusaurus/docusaurus.config.js @@ -14,6 +14,9 @@ const config = { markdown: { mermaid: true, + hooks: { + onBrokenMarkdownLinks: "warn", + }, }, themes: [ "@docusaurus/theme-mermaid", @@ -36,7 +39,6 @@ const config = { baseUrl: "/", onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", i18n: { defaultLocale: "en", diff --git a/docusaurus/package.json b/docusaurus/package.json index 7f09181aa..64ee6bd80 100644 --- a/docusaurus/package.json +++ b/docusaurus/package.json @@ -14,9 +14,9 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^3.8.1", - "@docusaurus/preset-classic": "^3.8.1", - "@docusaurus/theme-mermaid": "^3.8.1", + "@docusaurus/core": "^3.9.1", + "@docusaurus/preset-classic": "^3.9.1", + "@docusaurus/theme-mermaid": "^3.9.1", "@easyops-cn/docusaurus-search-local": "^0.46.1", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", @@ -31,8 +31,8 @@ "remark-mermaid-plugin": "^1.0.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.8.1", - "@docusaurus/types": "^3.8.1" + "@docusaurus/module-type-aliases": "^3.9.1", + "@docusaurus/types": "^3.9.1" }, "browserslist": { "production": [ diff --git a/docusaurus/yarn.lock b/docusaurus/yarn.lock index 6d65b7aaf..37507c287 100644 --- a/docusaurus/yarn.lock +++ b/docusaurus/yarn.lock @@ -2,153 +2,190 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.17.9": - version "1.17.9" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.17.9.tgz#83374c47dc72482aa45d6b953e89377047f0dcdc" - integrity sha512-O7BxrpLDPJWWHv/DLA9DRFWs+iY1uOJZkqUwjS5HSZAGcl0hIVCQ97LTLewiZmZ402JYUrun+8NqFP+hCknlbQ== - dependencies: - "@algolia/autocomplete-plugin-algolia-insights" "1.17.9" - "@algolia/autocomplete-shared" "1.17.9" - -"@algolia/autocomplete-plugin-algolia-insights@1.17.9": - version "1.17.9" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.9.tgz#74c86024d09d09e8bfa3dd90b844b77d9f9947b6" - integrity sha512-u1fEHkCbWF92DBeB/KHeMacsjsoI0wFhjZtlCq2ddZbAehshbZST6Hs0Avkc0s+4UyBGbMDnSuXHLuvRWK5iDQ== - dependencies: - "@algolia/autocomplete-shared" "1.17.9" - -"@algolia/autocomplete-preset-algolia@1.17.9": - version "1.17.9" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.9.tgz#911f3250544eb8ea4096fcfb268f156b085321b5" - integrity sha512-Na1OuceSJeg8j7ZWn5ssMu/Ax3amtOwk76u4h5J4eK2Nx2KB5qt0Z4cOapCsxot9VcEN11ADV5aUSlQF4RhGjQ== - dependencies: - "@algolia/autocomplete-shared" "1.17.9" - -"@algolia/autocomplete-shared@1.17.9": - version "1.17.9" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.9.tgz#5f38868f7cb1d54b014b17a10fc4f7e79d427fa8" - integrity sha512-iDf05JDQ7I0b7JEA/9IektxN/80a2MZ1ToohfmNS3rfeuQnIKI3IJlIafD0xu4StbtQTghx9T3Maa97ytkXenQ== - -"@algolia/client-abtesting@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-abtesting/-/client-abtesting-5.25.0.tgz#012204f1614e1a71366fb1e117c8f195186ff081" - integrity sha512-1pfQulNUYNf1Tk/svbfjfkLBS36zsuph6m+B6gDkPEivFmso/XnRgwDvjAx80WNtiHnmeNjIXdF7Gos8+OLHqQ== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" - -"@algolia/client-analytics@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-5.25.0.tgz#eba015bfafb3dbb82712c9160a00717a5974ff71" - integrity sha512-AFbG6VDJX/o2vDd9hqncj1B6B4Tulk61mY0pzTtzKClyTDlNP0xaUiEKhl6E7KO9I/x0FJF5tDCm0Hn6v5x18A== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" - -"@algolia/client-common@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-5.25.0.tgz#2def8947efe849266057d92f67d1b8d83de0c005" - integrity sha512-il1zS/+Rc6la6RaCdSZ2YbJnkQC6W1wiBO8+SH+DE6CPMWBU6iDVzH0sCKSAtMWl9WBxoN6MhNjGBnCv9Yy2bA== - -"@algolia/client-insights@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-insights/-/client-insights-5.25.0.tgz#b87df8614b96c4cc9c9aa7765cce07fa70864fa8" - integrity sha512-blbjrUH1siZNfyCGeq0iLQu00w3a4fBXm0WRIM0V8alcAPo7rWjLbMJMrfBtzL9X5ic6wgxVpDADXduGtdrnkw== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" - -"@algolia/client-personalization@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-5.25.0.tgz#74b041f0e7d91e1009c131c8d716c34e4d45c30f" - integrity sha512-aywoEuu1NxChBcHZ1pWaat0Plw7A8jDMwjgRJ00Mcl7wGlwuPt5dJ/LTNcg3McsEUbs2MBNmw0ignXBw9Tbgow== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" - -"@algolia/client-query-suggestions@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-query-suggestions/-/client-query-suggestions-5.25.0.tgz#e92d935d9e2994f790d43c64d3518d81070a3888" - integrity sha512-a/W2z6XWKjKjIW1QQQV8PTTj1TXtaKx79uR3NGBdBdGvVdt24KzGAaN7sCr5oP8DW4D3cJt44wp2OY/fZcPAVA== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" - -"@algolia/client-search@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-5.25.0.tgz#dc38ca1015f2f4c9f5053a4517f96fb28a2117f8" - integrity sha512-9rUYcMIBOrCtYiLX49djyzxqdK9Dya/6Z/8sebPn94BekT+KLOpaZCuc6s0Fpfq7nx5J6YY5LIVFQrtioK9u0g== - dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" +"@ai-sdk/gateway@1.0.32": + version "1.0.32" + resolved "https://registry.yarnpkg.com/@ai-sdk/gateway/-/gateway-1.0.32.tgz#a471cef0babbfda20910a8000db6ba27ba20a3ed" + integrity sha512-TQRIM63EI/ccJBc7RxeB8nq/CnGNnyl7eu5stWdLwL41stkV5skVeZJe0QRvFbaOrwCkgUVE0yrUqJi4tgDC1A== + dependencies: + "@ai-sdk/provider" "2.0.0" + "@ai-sdk/provider-utils" "3.0.10" + +"@ai-sdk/provider-utils@3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@ai-sdk/provider-utils/-/provider-utils-3.0.10.tgz#f76010c78445bb25cfc102bcd7e162103e6e7d96" + integrity sha512-T1gZ76gEIwffep6MWI0QNy9jgoybUHE7TRaHB5k54K8mF91ciGFlbtCGxDYhMH3nCRergKwYFIDeFF0hJSIQHQ== + dependencies: + "@ai-sdk/provider" "2.0.0" + "@standard-schema/spec" "^1.0.0" + eventsource-parser "^3.0.5" + +"@ai-sdk/provider@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ai-sdk/provider/-/provider-2.0.0.tgz#b853c739d523b33675bc74b6c506b2c690bc602b" + integrity sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA== + dependencies: + json-schema "^0.4.0" + +"@ai-sdk/react@^2.0.30": + version "2.0.59" + resolved "https://registry.yarnpkg.com/@ai-sdk/react/-/react-2.0.59.tgz#7cc0bacf823d30e60db8f10692bc160208020c0f" + integrity sha512-whuMGkiRugJIQNJEIpt3gv53EsvQ6ub7Qh19ujbUcvXZKwoCCZlEGmUqEJqvPVRm95d4uYXFxEk0wqpxOpsm6g== + dependencies: + "@ai-sdk/provider-utils" "3.0.10" + ai "5.0.59" + swr "^2.2.5" + throttleit "2.1.0" + +"@algolia/abtesting@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@algolia/abtesting/-/abtesting-1.5.0.tgz#3faf3770c7fcb4afcf86d9ac29d29c3cfca33441" + integrity sha512-W/ohRkbKQsqDWALJg28X15KF7Tcyg53L1MfdOkLgvkcCcofdzGHSimHHeNG05ojjFw9HK8+VPhe/Vwq4MozIJg== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/autocomplete-core@1.19.2": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.19.2.tgz#702df67a08cb3cfe8c33ee1111ef136ec1a9e232" + integrity sha512-mKv7RyuAzXvwmq+0XRK8HqZXt9iZ5Kkm2huLjgn5JoCPtDy+oh9yxUMfDDaVCw0oyzZ1isdJBc7l9nuCyyR7Nw== + dependencies: + "@algolia/autocomplete-plugin-algolia-insights" "1.19.2" + "@algolia/autocomplete-shared" "1.19.2" + +"@algolia/autocomplete-plugin-algolia-insights@1.19.2": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.2.tgz#3584b625b9317e333d1ae43664d02358e175c52d" + integrity sha512-TjxbcC/r4vwmnZaPwrHtkXNeqvlpdyR+oR9Wi2XyfORkiGkLTVhX2j+O9SaCCINbKoDfc+c2PB8NjfOnz7+oKg== + dependencies: + "@algolia/autocomplete-shared" "1.19.2" + +"@algolia/autocomplete-shared@1.19.2": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.2.tgz#c0b7b8dc30a5c65b70501640e62b009535e4578f" + integrity sha512-jEazxZTVD2nLrC+wYlVHQgpBoBB5KPStrJxLzsIFl6Kqd1AlG9sIAGl39V5tECLpIQzB3Qa2T6ZPJ1ChkwMK/w== + +"@algolia/client-abtesting@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-abtesting/-/client-abtesting-5.39.0.tgz#7de7ad39e0b98b60bd25e61c113aab0d6918c80a" + integrity sha512-Vf0ZVe+qo3sHDrCinouJqlg8VoxM4Qo/KxNIqMYybkuctutfnp3kIY9OmESplOQ/9NGBthU9EG+4d5fBibWK/A== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/client-analytics@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-5.39.0.tgz#be55775f09734d9031579657e182d5456e4f1924" + integrity sha512-V16ITZxYIwcv1arNce65JZmn94Ft6vKlBZ//gXw8AvIH32glJz1KcbaVAUr9p7PYlGZ/XVHP6LxDgrpNdtwgcA== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/client-common@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-5.39.0.tgz#3c16868b645d6e984920ae43509726e19995042f" + integrity sha512-UCJTuwySEQeiKPWV3wruhuI/wHbDYenHzgL9pYsvh6r/u5Z+g61ip1iwdAlFp02CnywzI9O7+AQPh2ManYyHmQ== + +"@algolia/client-insights@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-insights/-/client-insights-5.39.0.tgz#0d03882ec93b63346459c67bc94f782ea17f7030" + integrity sha512-s0ia8M/ZZR+iO2uLNTBrlQdEb6ZMAMcKMHckp5mcoglxrf8gHifL4LmdhGKdAxAn3UIagtqIP0RCnIymHUbm7A== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/client-personalization@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-5.39.0.tgz#ebf29cd9aeb9cde8a33fbd954d0452ab76969f8f" + integrity sha512-vZPIt7Lw+toNsHZUiPhNIc1Z3vUjDp7nzn6AMOaPC73gEuTq2iLPNvM06CSB6aHePo5eMeJIP5YEKBUQUA/PJA== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/client-query-suggestions@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-query-suggestions/-/client-query-suggestions-5.39.0.tgz#4f5d11e404f6e16712b53c79115d05ee3de65a85" + integrity sha512-jcPQr3iKTWNVli2NYHPv02aNLwixDjPCpOgMp9CZTvEiPI6Ec4jHX+oFr3LDZagOFY9e1xJhc/JrgMGGW1sHnw== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" + +"@algolia/client-search@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-5.39.0.tgz#fdce8cdb4cc972a5e1faf313316b5d9f126001bf" + integrity sha512-/IYpF10BpthGZEJQZMhMqV4AqWr5avcWfZm/SIKK1RvUDmzGqLoW/+xeJVX9C8ZnNkIC8hivbIQFaNaRw0BFZQ== + dependencies: + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" "@algolia/events@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@algolia/events/-/events-4.0.1.tgz#fd39e7477e7bc703d7f893b556f676c032af3950" integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ== -"@algolia/ingestion@1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@algolia/ingestion/-/ingestion-1.25.0.tgz#4d13c56dda0a05c7bacb0e3ef5866292dfd86ed5" - integrity sha512-jJeH/Hk+k17Vkokf02lkfYE4A+EJX+UgnMhTLR/Mb+d1ya5WhE+po8p5a/Nxb6lo9OLCRl6w3Hmk1TX1e9gVbQ== +"@algolia/ingestion@1.39.0": + version "1.39.0" + resolved "https://registry.yarnpkg.com/@algolia/ingestion/-/ingestion-1.39.0.tgz#4e2959a830523373aa92b20e80139ca828ac03dc" + integrity sha512-IgSHKUiuecqLfBlXiuCSdRTdsO3/yvpmXrMFz8fAJ8M4QmDtHkOuD769dmybRYqsbYMHivw+lir4BgbRGMtOIQ== dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" -"@algolia/monitoring@1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@algolia/monitoring/-/monitoring-1.25.0.tgz#d59360cfe556338519d05a9d8107147e9dbcb020" - integrity sha512-Ls3i1AehJ0C6xaHe7kK9vPmzImOn5zBg7Kzj8tRYIcmCWVyuuFwCIsbuIIz/qzUf1FPSWmw0TZrGeTumk2fqXg== +"@algolia/monitoring@1.39.0": + version "1.39.0" + resolved "https://registry.yarnpkg.com/@algolia/monitoring/-/monitoring-1.39.0.tgz#c7292bc099351e9a63cb9c63f1531b2eba84c7b8" + integrity sha512-8Xnd4+609SKC/hqVsuFc4evFBmvA2765/4NcH+Dpr756SKPbL1BY0X8kVxlmM3YBLNqnduSQxHxpDJUK58imCA== dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" -"@algolia/recommend@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/recommend/-/recommend-5.25.0.tgz#b96f12c85aa74a0326982c7801fcd4a610b420f4" - integrity sha512-79sMdHpiRLXVxSjgw7Pt4R1aNUHxFLHiaTDnN2MQjHwJ1+o3wSseb55T9VXU4kqy3m7TUme3pyRhLk5ip/S4Mw== +"@algolia/recommend@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/recommend/-/recommend-5.39.0.tgz#6b8ebfc05e86df0e6f499c81ad3b9025191a973f" + integrity sha512-D7Ye2Ss/5xqUkQUxKm/VqEJLt5kARd9IMmjdzlxaKhGgNlOemTay0lwBmOVFuJRp7UODjp5c9+K+B8g0ORObIw== dependencies: - "@algolia/client-common" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" + "@algolia/client-common" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" -"@algolia/requester-browser-xhr@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.25.0.tgz#c194fa5f49206b9343e6646c41bfbca2a3f2ac54" - integrity sha512-JLaF23p1SOPBmfEqozUAgKHQrGl3z/Z5RHbggBu6s07QqXXcazEsub5VLonCxGVqTv6a61AAPr8J1G5HgGGjEw== +"@algolia/requester-browser-xhr@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.39.0.tgz#2fc3a126cda69c1ea1f0130a5bd3d1a5abdfe8f0" + integrity sha512-mgPte1ZJqpk9dkVs44J3wKAbHATvHZNlSpzhMdjMLIg/3qTycSZyDiomLiSlxE8CLsxyBAOJWnyKRHfom+Z1rg== dependencies: - "@algolia/client-common" "5.25.0" + "@algolia/client-common" "5.39.0" -"@algolia/requester-fetch@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/requester-fetch/-/requester-fetch-5.25.0.tgz#231a2d0da2397d141f80b8f28e2cb6e3d219d38d" - integrity sha512-rtzXwqzFi1edkOF6sXxq+HhmRKDy7tz84u0o5t1fXwz0cwx+cjpmxu/6OQKTdOJFS92JUYHsG51Iunie7xbqfQ== +"@algolia/requester-fetch@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/requester-fetch/-/requester-fetch-5.39.0.tgz#f470926aa005ce5b1f4728ecd645032ed2f43f91" + integrity sha512-LIrCkrxu1WnO3ev1+w6NnZ12JZL/o+2H9w6oWnZAjQZIlA/Ym6M9QHkt+OQ/SwkuoiNkW3DAo+Pi4A2V9FPtqg== dependencies: - "@algolia/client-common" "5.25.0" + "@algolia/client-common" "5.39.0" -"@algolia/requester-node-http@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-5.25.0.tgz#0ce13c550890de21c558b04381535d2d245a3725" - integrity sha512-ZO0UKvDyEFvyeJQX0gmZDQEvhLZ2X10K+ps6hViMo1HgE2V8em00SwNsQ+7E/52a+YiBkVWX61pJJJE44juDMQ== +"@algolia/requester-node-http@5.39.0": + version "5.39.0" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-5.39.0.tgz#537cec65ebee684fe0cec7921128c425f95ff0bd" + integrity sha512-6beG+egPwXmvhAg+m0STCj+ZssDcjrLzf4L05aKm2nGglMXSSPz0cH/rM+kVD9krNfldiMctURd4wjojW1fV0w== dependencies: - "@algolia/client-common" "5.25.0" + "@algolia/client-common" "5.39.0" "@ampproject/remapping@^2.2.0": version "2.3.0" @@ -1692,20 +1729,23 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@docsearch/css@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.9.0.tgz#3bc29c96bf024350d73b0cfb7c2a7b71bf251cd5" - integrity sha512-cQbnVbq0rrBwNAKegIac/t6a8nWoUAn8frnkLFW6YARaRmAQr5/Eoe6Ln2fqkUCZ40KpdrKbpSAmgrkviOxuWA== +"@docsearch/css@4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-4.1.0.tgz#e156e011539d73624b2354dc8be8e96ac9be9ddc" + integrity sha512-nuNKGjHj/FQeWgE9t+i83QD/V67QiaAmGY7xS9TVCRUiCqSljOgIKlsLoQZKKVwEG8f+OWKdznzZkJxGZ7d06A== -"@docsearch/react@^3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.9.0.tgz#d0842b700c3ee26696786f3c8ae9f10c1a3f0db3" - integrity sha512-mb5FOZYZIkRQ6s/NWnM98k879vu5pscWqTLubLFBO87igYYT4VzVazh4h5o/zCvTIZgEt3PvsCOMOswOUo9yHQ== +"@docsearch/react@^3.9.0 || ^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-4.1.0.tgz#a04f22324067f2e39dbe12f0e1247e7e0341d26d" + integrity sha512-4GHI7TT3sJZ2Vs4Kjadv7vAkMrTsJqHvzvxO3JA7UT8iPRKaDottG5o5uNshPWhVVaBYPC35Ukf8bfCotGpjSg== dependencies: - "@algolia/autocomplete-core" "1.17.9" - "@algolia/autocomplete-preset-algolia" "1.17.9" - "@docsearch/css" "3.9.0" - algoliasearch "^5.14.2" + "@ai-sdk/react" "^2.0.30" + "@algolia/autocomplete-core" "1.19.2" + "@docsearch/css" "4.1.0" + ai "^5.0.30" + algoliasearch "^5.28.0" + marked "^16.3.0" + zod "^4.1.8" "@docusaurus/babel@3.7.0": version "3.7.0" @@ -1728,10 +1768,10 @@ fs-extra "^11.1.1" tslib "^2.6.0" -"@docusaurus/babel@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/babel/-/babel-3.8.1.tgz#db329ac047184214e08e2dbc809832c696c18506" - integrity sha512-3brkJrml8vUbn9aeoZUlJfsI/GqyFcDgQJwQkmBtclJgWDEQBKKeagZfOgx0WfUQhagL1sQLNW0iBdxnI863Uw== +"@docusaurus/babel@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/babel/-/babel-3.9.1.tgz#5297195ab34df9e184e3e2fe20de1a2e1b2a22e8" + integrity sha512-/uoi3oG+wvbVWNBRfPrzrEslOSeLxrQEyWMywK51TLDFTANqIRivzkMusudh5bdDty8fXzCYUT+tg5t697jYqg== dependencies: "@babel/core" "^7.25.9" "@babel/generator" "^7.25.9" @@ -1743,8 +1783,8 @@ "@babel/runtime" "^7.25.9" "@babel/runtime-corejs3" "^7.25.9" "@babel/traverse" "^7.25.9" - "@docusaurus/logger" "3.8.1" - "@docusaurus/utils" "3.8.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/utils" "3.9.1" babel-plugin-dynamic-import-node "^2.3.3" fs-extra "^11.1.1" tslib "^2.6.0" @@ -1780,17 +1820,17 @@ webpack "^5.95.0" webpackbar "^6.0.1" -"@docusaurus/bundler@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/bundler/-/bundler-3.8.1.tgz#e2b11d615f09a6e470774bb36441b8d06736b94c" - integrity sha512-/z4V0FRoQ0GuSLToNjOSGsk6m2lQUG4FRn8goOVoZSRsTrU8YR2aJacX5K3RG18EaX9b+52pN4m1sL3MQZVsQA== +"@docusaurus/bundler@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/bundler/-/bundler-3.9.1.tgz#6b78c152cf364d706249f6978f8e3fedf576b118" + integrity sha512-E1c9DgNmAz4NqbNtiJVp4UgjLtr8O01IgtXD/NDQ4PZaK8895cMiTOgb3k7mN0qX8A3lb8vqyrPJ842+yMpuUg== dependencies: "@babel/core" "^7.25.9" - "@docusaurus/babel" "3.8.1" - "@docusaurus/cssnano-preset" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" + "@docusaurus/babel" "3.9.1" + "@docusaurus/cssnano-preset" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" babel-loader "^9.2.1" clean-css "^5.3.3" copy-webpack-plugin "^11.0.0" @@ -1858,18 +1898,18 @@ webpack-dev-server "^4.15.2" webpack-merge "^6.0.1" -"@docusaurus/core@3.8.1", "@docusaurus/core@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.8.1.tgz#c22e47c16a22cb7d245306c64bc54083838ff3db" - integrity sha512-ENB01IyQSqI2FLtOzqSI3qxG2B/jP4gQPahl2C3XReiLebcVh5B5cB9KYFvdoOqOWPyr5gXK4sjgTKv7peXCrA== - dependencies: - "@docusaurus/babel" "3.8.1" - "@docusaurus/bundler" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" +"@docusaurus/core@3.9.1", "@docusaurus/core@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.9.1.tgz#be4d859464fee8889794d8527f884e931d591f2e" + integrity sha512-FWDk1LIGD5UR5Zmm9rCrXRoxZUgbwuP6FBA7rc50DVfzqDOMkeMe3NyJhOsA2dF0zBE3VbHEIMmTjKwTZJwbaA== + dependencies: + "@docusaurus/babel" "3.9.1" + "@docusaurus/bundler" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" boxen "^6.2.1" chalk "^4.1.2" chokidar "^3.5.3" @@ -1903,7 +1943,7 @@ update-notifier "^6.0.2" webpack "^5.95.0" webpack-bundle-analyzer "^4.10.2" - webpack-dev-server "^4.15.2" + webpack-dev-server "^5.2.2" webpack-merge "^6.0.1" "@docusaurus/cssnano-preset@3.7.0": @@ -1916,10 +1956,10 @@ postcss-sort-media-queries "^5.2.0" tslib "^2.6.0" -"@docusaurus/cssnano-preset@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.8.1.tgz#bd55026251a6ab8e2194839a2042458ef9880c44" - integrity sha512-G7WyR2N6SpyUotqhGznERBK+x84uyhfMQM2MmDLs88bw4Flom6TY46HzkRkSEzaP9j80MbTN8naiL1fR17WQug== +"@docusaurus/cssnano-preset@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.9.1.tgz#fa57c81a3f41e4d118115f86c85a71aed6b90f49" + integrity sha512-2y7+s7RWQMqBg+9ejeKwvZs7Bdw/hHIVJIodwMXbs2kr+S48AhcmAfdOh6Cwm0unJb0hJUshN0ROwRoQMwl3xg== dependencies: cssnano-preset-advanced "^6.1.2" postcss "^8.5.4" @@ -1934,10 +1974,10 @@ chalk "^4.1.2" tslib "^2.6.0" -"@docusaurus/logger@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.8.1.tgz#45321b2e2e14695d0dbd8b4104ea7b0fbaa98700" - integrity sha512-2wjeGDhKcExEmjX8k1N/MRDiPKXGF2Pg+df/bDDPnnJWHXnVEZxXj80d6jcxp1Gpnksl0hF8t/ZQw9elqj2+ww== +"@docusaurus/logger@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.9.1.tgz#0209c4c1044ee35d89dbf676e3cbb5dc8b59c82b" + integrity sha512-C9iFzXwHzwvGlisE4bZx+XQE0JIqlGAYAd5LzpR7fEDgjctu7yL8bE5U4nTNywXKHURDzMt4RJK8V6+stFHVkA== dependencies: chalk "^4.1.2" tslib "^2.6.0" @@ -1972,14 +2012,14 @@ vfile "^6.0.1" webpack "^5.88.1" -"@docusaurus/mdx-loader@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.8.1.tgz#74309b3614bbcef1d55fb13e6cc339b7fb000b5f" - integrity sha512-DZRhagSFRcEq1cUtBMo4TKxSNo/W6/s44yhr8X+eoXqCLycFQUylebOMPseHi5tc4fkGJqwqpWJLz6JStU9L4w== +"@docusaurus/mdx-loader@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.9.1.tgz#0ef77bee13450c83c18338f8e5f1753ed2e9ee3f" + integrity sha512-/1PY8lqry8jCt0qZddJSpc0U2sH6XC27kVJZfpA7o2TiQ3mdBQyH5AVbj/B2m682B1ounE+XjI0LdpOkAQLPoA== dependencies: - "@docusaurus/logger" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" "@mdx-js/mdx" "^3.0.0" "@slorber/remark-comment" "^1.0.0" escape-html "^1.0.3" @@ -2015,12 +2055,12 @@ react-helmet-async "npm:@slorber/react-helmet-async@*" react-loadable "npm:@docusaurus/react-loadable@6.0.0" -"@docusaurus/module-type-aliases@3.8.1", "@docusaurus/module-type-aliases@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.8.1.tgz#454de577bd7f50b5eae16db0f76b49ca5e4e281a" - integrity sha512-6xhvAJiXzsaq3JdosS7wbRt/PwEPWHr9eM4YNYqVlbgG1hSK3uQDXTVvQktasp3VO6BmfYWPozueLWuj4gB+vg== +"@docusaurus/module-type-aliases@3.9.1", "@docusaurus/module-type-aliases@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.9.1.tgz#201959a22e7b30881cf879a21d2ae5b26415b705" + integrity sha512-YBce3GbJGGcMbJTyHcnEOMvdXqg41pa5HsrMCGA5Rm4z0h0tHS6YtEldj0mlfQRhCG7Y0VD66t2tb87Aom+11g== dependencies: - "@docusaurus/types" "3.8.1" + "@docusaurus/types" "3.9.1" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" @@ -2028,19 +2068,19 @@ react-helmet-async "npm:@slorber/react-helmet-async@1.3.0" react-loadable "npm:@docusaurus/react-loadable@6.0.0" -"@docusaurus/plugin-content-blog@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.8.1.tgz#88d842b562b04cf59df900d9f6984b086f821525" - integrity sha512-vNTpMmlvNP9n3hGEcgPaXyvTljanAKIUkuG9URQ1DeuDup0OR7Ltvoc8yrmH+iMZJbcQGhUJF+WjHLwuk8HSdw== - dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" +"@docusaurus/plugin-content-blog@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.9.1.tgz#bf6619847065360d52abc5bf1da307f5ce2a19f8" + integrity sha512-vT6kIimpJLWvW9iuWzH4u7VpTdsGlmn4yfyhq0/Kb1h4kf9uVouGsTmrD7WgtYBUG1P+TSmQzUUQa+ALBSRTig== + dependencies: + "@docusaurus/core" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" cheerio "1.0.0-rc.12" feed "^4.2.2" fs-extra "^11.1.1" @@ -2052,20 +2092,20 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-docs@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.8.1.tgz#40686a206abb6373bee5638de100a2c312f112a4" - integrity sha512-oByRkSZzeGNQByCMaX+kif5Nl2vmtj2IHQI2fWjCfCootsdKZDPFLonhIp5s3IGJO7PLUfe0POyw0Xh/RrGXJA== - dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/module-type-aliases" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" +"@docusaurus/plugin-content-docs@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.1.tgz#e3e75d4aa310689c262c18e10010788e53f101ec" + integrity sha512-DyLk9BIA6I9gPIuia8XIL+XIEbNnExam6AHzRsfrEq4zJr7k/DsWW7oi4aJMepDnL7jMRhpVcdsCxdjb0/A9xg== + dependencies: + "@docusaurus/core" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/module-type-aliases" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" "@types/react-router-config" "^5.0.7" combine-promises "^1.1.0" fs-extra "^11.1.1" @@ -2099,145 +2139,144 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-pages@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.8.1.tgz#41b684dbd15390b7bb6a627f78bf81b6324511ac" - integrity sha512-a+V6MS2cIu37E/m7nDJn3dcxpvXb6TvgdNI22vJX8iUTp8eoMoPa0VArEbWvCxMY/xdC26WzNv4wZ6y0iIni/w== +"@docusaurus/plugin-content-pages@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.9.1.tgz#044b8adbd2a673ff22630a74b3e0ce482761655d" + integrity sha512-/1wFzRnXYASI+Nv9ck9IVPIMw0O5BGQ8ZVhDzEwhkL+tl44ycvSnY6PIe6rW2HLxsw61Z3WFwAiU8+xMMtMZpg== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" fs-extra "^11.1.1" tslib "^2.6.0" webpack "^5.88.1" -"@docusaurus/plugin-css-cascade-layers@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-css-cascade-layers/-/plugin-css-cascade-layers-3.8.1.tgz#cb414b4a82aa60fc64ef2a435ad0105e142a6c71" - integrity sha512-VQ47xRxfNKjHS5ItzaVXpxeTm7/wJLFMOPo1BkmoMG4Cuz4nuI+Hs62+RMk1OqVog68Swz66xVPK8g9XTrBKRw== +"@docusaurus/plugin-css-cascade-layers@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-css-cascade-layers/-/plugin-css-cascade-layers-3.9.1.tgz#958a04679279e787d14fd3cc423ad35c580dc6fc" + integrity sha512-/QyW2gRCk/XE3ttCK/ERIgle8KJ024dBNKMu6U5SmpJvuT2il1n5jR/48Pp/9wEwut8WVml4imNm6X8JsL5A0Q== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" tslib "^2.6.0" -"@docusaurus/plugin-debug@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.8.1.tgz#45b107e46b627caaae66995f53197ace78af3491" - integrity sha512-nT3lN7TV5bi5hKMB7FK8gCffFTBSsBsAfV84/v293qAmnHOyg1nr9okEw8AiwcO3bl9vije5nsUvP0aRl2lpaw== +"@docusaurus/plugin-debug@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.9.1.tgz#5dbe01771176697f427b89a1ff023a3967c3e674" + integrity sha512-qPeAuk0LccC251d7jg2MRhNI+o7niyqa924oEM/AxnZJvIpMa596aAxkRImiAqNN6+gtLE1Hkrz/RHUH2HDGsA== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" fs-extra "^11.1.1" react-json-view-lite "^2.3.0" tslib "^2.6.0" -"@docusaurus/plugin-google-analytics@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.8.1.tgz#64a302e62fe5cb6e007367c964feeef7b056764a" - integrity sha512-Hrb/PurOJsmwHAsfMDH6oVpahkEGsx7F8CWMjyP/dw1qjqmdS9rcV1nYCGlM8nOtD3Wk/eaThzUB5TSZsGz+7Q== +"@docusaurus/plugin-google-analytics@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.9.1.tgz#226e39ed6d0a5eb3978dc5189bc9676235756446" + integrity sha512-k4Qq2HphqOrIU/CevGPdEO1yJnWUI8m0zOJsYt5NfMJwNsIn/gDD6gv/DKD+hxHndQT5pacsfBd4BWHZVNVroQ== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" tslib "^2.6.0" -"@docusaurus/plugin-google-gtag@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.8.1.tgz#8c76f8a1d96448f2f0f7b10e6bde451c40672b95" - integrity sha512-tKE8j1cEZCh8KZa4aa80zpSTxsC2/ZYqjx6AAfd8uA8VHZVw79+7OTEP2PoWi0uL5/1Is0LF5Vwxd+1fz5HlKg== +"@docusaurus/plugin-google-gtag@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.9.1.tgz#971b075898d46d1a59482b2873ccb9aa2e679910" + integrity sha512-n9BURBiQyJKI/Ecz35IUjXYwXcgNCSq7/eA07+ZYcDiSyH2p/EjPf8q/QcZG3CyEJPZ/SzGkDHePfcVPahY4Gg== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" "@types/gtag.js" "^0.0.12" tslib "^2.6.0" -"@docusaurus/plugin-google-tag-manager@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.8.1.tgz#88241ffd06369f4a4d5fb982ff3ac2777561ae37" - integrity sha512-iqe3XKITBquZq+6UAXdb1vI0fPY5iIOitVjPQ581R1ZKpHr0qe+V6gVOrrcOHixPDD/BUKdYwkxFjpNiEN+vBw== +"@docusaurus/plugin-google-tag-manager@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.9.1.tgz#b26770d8bb07cedc1e01305cd9d66c2e4ce6d654" + integrity sha512-rZAQZ25ZuXaThBajxzLjXieTDUCMmBzfAA6ThElQ3o7Q+LEpOjCIrwGFau0KLY9HeG6x91+FwwsAM8zeApYDrg== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" tslib "^2.6.0" -"@docusaurus/plugin-sitemap@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.8.1.tgz#3aebd39186dc30e53023f1aab44625bc0bdac892" - integrity sha512-+9YV/7VLbGTq8qNkjiugIelmfUEVkTyLe6X8bWq7K5qPvGXAjno27QAfFq63mYfFFbJc7z+pudL63acprbqGzw== - dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" +"@docusaurus/plugin-sitemap@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.9.1.tgz#e84717c1e52f3a61f9fea414ef98ebe025e7ffd2" + integrity sha512-k/bf5cXDxAJUYTzqatgFJwmZsLUbIgl6S8AdZMKGG2Mv2wcOHt+EQNN9qPyWZ5/9cFj+Q8f8DN+KQheBMYLong== + dependencies: + "@docusaurus/core" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" fs-extra "^11.1.1" sitemap "^7.1.1" tslib "^2.6.0" -"@docusaurus/plugin-svgr@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-svgr/-/plugin-svgr-3.8.1.tgz#6f340be8eae418a2cce540d8ece096ffd9c9b6ab" - integrity sha512-rW0LWMDsdlsgowVwqiMb/7tANDodpy1wWPwCcamvhY7OECReN3feoFwLjd/U4tKjNY3encj0AJSTxJA+Fpe+Gw== +"@docusaurus/plugin-svgr@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-svgr/-/plugin-svgr-3.9.1.tgz#394ad2b8da3af587a0f68167252b4bf99fb72351" + integrity sha512-TeZOXT2PSdTNR1OpDJMkYqFyX7MMhbd4t16hQByXksgZQCXNyw3Dio+KaDJ2Nj+LA4WkOvsk45bWgYG5MAaXSQ== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" "@svgr/core" "8.1.0" "@svgr/webpack" "^8.1.0" tslib "^2.6.0" webpack "^5.88.1" -"@docusaurus/preset-classic@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.8.1.tgz#bb79fd12f3211363720c569a526c7e24d3aa966b" - integrity sha512-yJSjYNHXD8POMGc2mKQuj3ApPrN+eG0rO1UPgSx7jySpYU+n4WjBikbrA2ue5ad9A7aouEtMWUoiSRXTH/g7KQ== - dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/plugin-content-blog" "3.8.1" - "@docusaurus/plugin-content-docs" "3.8.1" - "@docusaurus/plugin-content-pages" "3.8.1" - "@docusaurus/plugin-css-cascade-layers" "3.8.1" - "@docusaurus/plugin-debug" "3.8.1" - "@docusaurus/plugin-google-analytics" "3.8.1" - "@docusaurus/plugin-google-gtag" "3.8.1" - "@docusaurus/plugin-google-tag-manager" "3.8.1" - "@docusaurus/plugin-sitemap" "3.8.1" - "@docusaurus/plugin-svgr" "3.8.1" - "@docusaurus/theme-classic" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/theme-search-algolia" "3.8.1" - "@docusaurus/types" "3.8.1" - -"@docusaurus/theme-classic@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.8.1.tgz#1e45c66d89ded359225fcd29bf3258d9205765c1" - integrity sha512-bqDUCNqXeYypMCsE1VcTXSI1QuO4KXfx8Cvl6rYfY0bhhqN6d2WZlRkyLg/p6pm+DzvanqHOyYlqdPyP0iz+iw== - dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/module-type-aliases" "3.8.1" - "@docusaurus/plugin-content-blog" "3.8.1" - "@docusaurus/plugin-content-docs" "3.8.1" - "@docusaurus/plugin-content-pages" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/theme-translations" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" +"@docusaurus/preset-classic@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.9.1.tgz#58d86664b5c9779578092556a0e6ae5ccebbd6c0" + integrity sha512-ZHga2xsxxsyd0dN1BpLj8S889Eu9eMBuj2suqxdw/vaaXu/FjJ8KEGbcaeo6nHPo8VQcBBnPEdkBtSDm2TfMNw== + dependencies: + "@docusaurus/core" "3.9.1" + "@docusaurus/plugin-content-blog" "3.9.1" + "@docusaurus/plugin-content-docs" "3.9.1" + "@docusaurus/plugin-content-pages" "3.9.1" + "@docusaurus/plugin-css-cascade-layers" "3.9.1" + "@docusaurus/plugin-debug" "3.9.1" + "@docusaurus/plugin-google-analytics" "3.9.1" + "@docusaurus/plugin-google-gtag" "3.9.1" + "@docusaurus/plugin-google-tag-manager" "3.9.1" + "@docusaurus/plugin-sitemap" "3.9.1" + "@docusaurus/plugin-svgr" "3.9.1" + "@docusaurus/theme-classic" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/theme-search-algolia" "3.9.1" + "@docusaurus/types" "3.9.1" + +"@docusaurus/theme-classic@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.9.1.tgz#790fb1b8058d0572632211023ead238c1a6450e0" + integrity sha512-LrAIu/mQ04nG6s1cssC0TMmICD8twFIIn/hJ5Pd9uIPQvtKnyAKEn12RefopAul5KfMo9kixPaqogV5jIJr26w== + dependencies: + "@docusaurus/core" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/module-type-aliases" "3.9.1" + "@docusaurus/plugin-content-blog" "3.9.1" + "@docusaurus/plugin-content-docs" "3.9.1" + "@docusaurus/plugin-content-pages" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/theme-translations" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" "@mdx-js/react" "^3.0.0" clsx "^2.0.0" - copy-text-to-clipboard "^3.2.0" infima "0.2.0-alpha.45" lodash "^4.17.21" nprogress "^0.2.0" @@ -2267,15 +2306,15 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-common@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.8.1.tgz#17c23316fbe3ee3f7e707c7298cb59a0fff38b4b" - integrity sha512-UswMOyTnPEVRvN5Qzbo+l8k4xrd5fTFu2VPPfD6FcW/6qUtVLmJTQCktbAL3KJ0BVXGm5aJXz/ZrzqFuZERGPw== +"@docusaurus/theme-common@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.9.1.tgz#095cbeab489d51380143951508571888f4d2928d" + integrity sha512-j9adi961F+6Ps9d0jcb5BokMcbjXAAJqKkV43eo8nh4YgmDj7KUNDX4EnOh/MjTQeO06oPY5cxp3yUXdW/8Ggw== dependencies: - "@docusaurus/mdx-loader" "3.8.1" - "@docusaurus/module-type-aliases" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" + "@docusaurus/mdx-loader" "3.9.1" + "@docusaurus/module-type-aliases" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" @@ -2285,34 +2324,34 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-mermaid@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-3.8.1.tgz#2b73b5e90057bd9fb46f267aeb2d3470b168a7c8" - integrity sha512-IWYqjyTPjkNnHsFFu9+4YkeXS7PD1xI3Bn2shOhBq+f95mgDfWInkpfBN4aYvx4fTT67Am6cPtohRdwh4Tidtg== +"@docusaurus/theme-mermaid@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-3.9.1.tgz#92de20580489e05b3da6716503fda17e5a337a4d" + integrity sha512-aKMFlQfxueVBPdCdrNSshG12fOkJXSn1sb6EhI/sGn3UpiTEiazJm4QLP6NoF78mqq8O5Ar2Yll+iHWLvCsuZQ== dependencies: - "@docusaurus/core" "3.8.1" - "@docusaurus/module-type-aliases" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" + "@docusaurus/core" "3.9.1" + "@docusaurus/module-type-aliases" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" mermaid ">=11.6.0" tslib "^2.6.0" -"@docusaurus/theme-search-algolia@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.8.1.tgz#3aa3d99c35cc2d4b709fcddd4df875a9b536e29b" - integrity sha512-NBFH5rZVQRAQM087aYSRKQ9yGEK9eHd+xOxQjqNpxMiV85OhJDD4ZGz6YJIod26Fbooy54UWVdzNU0TFeUUUzQ== - dependencies: - "@docsearch/react" "^3.9.0" - "@docusaurus/core" "3.8.1" - "@docusaurus/logger" "3.8.1" - "@docusaurus/plugin-content-docs" "3.8.1" - "@docusaurus/theme-common" "3.8.1" - "@docusaurus/theme-translations" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-validation" "3.8.1" - algoliasearch "^5.17.1" - algoliasearch-helper "^3.22.6" +"@docusaurus/theme-search-algolia@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.9.1.tgz#2f2ad5212201a1bed3acf8527ae6d81a079e654e" + integrity sha512-WjM28bzlgfT6nHlEJemkwyGVpvGsZWPireV/w+wZ1Uo64xCZ8lNOb4xwQRukDaLSed3oPBN0gSnu06l5VuCXHg== + dependencies: + "@docsearch/react" "^3.9.0 || ^4.1.0" + "@docusaurus/core" "3.9.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/plugin-content-docs" "3.9.1" + "@docusaurus/theme-common" "3.9.1" + "@docusaurus/theme-translations" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-validation" "3.9.1" + algoliasearch "^5.37.0" + algoliasearch-helper "^3.26.0" clsx "^2.0.0" eta "^2.2.0" fs-extra "^11.1.1" @@ -2320,10 +2359,10 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.8.1.tgz#4b1d76973eb53861e167c7723485e059ba4ffd0a" - integrity sha512-OTp6eebuMcf2rJt4bqnvuwmm3NVXfzfYejL+u/Y1qwKhZPrjPoKWfk1CbOP5xH5ZOPkiAsx4dHdQBRJszK3z2g== +"@docusaurus/theme-translations@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.9.1.tgz#189f1942d0178bc0da659db88c07682c7d7191ee" + integrity sha512-mUQd49BSGKTiM6vP9+JFgRJL28lMIN3PUvXjF3rzuOHMByUZUBNwCt26Z23GkKiSIOrRkjKoaBNTipR/MHdYSQ== dependencies: fs-extra "^11.1.1" tslib "^2.6.0" @@ -2351,13 +2390,14 @@ webpack "^5.95.0" webpack-merge "^5.9.0" -"@docusaurus/types@3.8.1", "@docusaurus/types@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.8.1.tgz#83ab66c345464e003b576a49f78897482061fc26" - integrity sha512-ZPdW5AB+pBjiVrcLuw3dOS6BFlrG0XkS2lDGsj8TizcnREQg3J8cjsgfDviszOk4CweNfwo1AEELJkYaMUuOPg== +"@docusaurus/types@3.9.1", "@docusaurus/types@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.9.1.tgz#e4fdaf0b91ea014a6aae0d8b62d59f3f020117b6" + integrity sha512-ElekJ29sk39s5LTEZMByY1c2oH9FMtw7KbWFU3BtuQ1TytfIK39HhUivDEJvm5KCLyEnnfUZlvSNDXeyk0vzAA== dependencies: "@mdx-js/mdx" "^3.0.0" "@types/history" "^4.7.11" + "@types/mdast" "^4.0.2" "@types/react" "*" commander "^5.1.0" joi "^17.9.2" @@ -2374,12 +2414,12 @@ "@docusaurus/types" "3.7.0" tslib "^2.6.0" -"@docusaurus/utils-common@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.8.1.tgz#c369b8c3041afb7dcd595d4172beb1cc1015c85f" - integrity sha512-zTZiDlvpvoJIrQEEd71c154DkcriBecm4z94OzEE9kz7ikS3J+iSlABhFXM45mZ0eN5pVqqr7cs60+ZlYLewtg== +"@docusaurus/utils-common@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.9.1.tgz#202778391caed923c2527a166a3aae3a22b2dcad" + integrity sha512-4M1u5Q8Zn2CYL2TJ864M51FV4YlxyGyfC3x+7CLuR6xsyTVNBNU4QMcPgsTHRS9J2+X6Lq7MyH6hiWXyi/sXUQ== dependencies: - "@docusaurus/types" "3.8.1" + "@docusaurus/types" "3.9.1" tslib "^2.6.0" "@docusaurus/utils-validation@3.7.0", "@docusaurus/utils-validation@^2 || ^3": @@ -2396,14 +2436,14 @@ lodash "^4.17.21" tslib "^2.6.0" -"@docusaurus/utils-validation@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.8.1.tgz#0499c0d151a4098a0963237057993282cfbd538e" - integrity sha512-gs5bXIccxzEbyVecvxg6upTwaUbfa0KMmTj7HhHzc016AGyxH2o73k1/aOD0IFrdCsfJNt37MqNI47s2MgRZMA== +"@docusaurus/utils-validation@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.9.1.tgz#8f9816b31ffb647539881f3c153d46f54e6399f7" + integrity sha512-5bzab5si3E1udrlZuVGR17857Lfwe8iFPoy5AvMP9PXqDfoyIKT7gDQgAmxdRDMurgHaJlyhXEHHdzDKkOxxZQ== dependencies: - "@docusaurus/logger" "3.8.1" - "@docusaurus/utils" "3.8.1" - "@docusaurus/utils-common" "3.8.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/utils" "3.9.1" + "@docusaurus/utils-common" "3.9.1" fs-extra "^11.2.0" joi "^17.9.2" js-yaml "^4.1.0" @@ -2436,14 +2476,14 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/utils@3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.8.1.tgz#2ac1e734106e2f73dbd0f6a8824d525f9064e9f0" - integrity sha512-P1ml0nvOmEFdmu0smSXOqTS1sxU5tqvnc0dA4MTKV39kye+bhQnjkIKEE18fNOvxjyB86k8esoCIFM3x4RykOQ== +"@docusaurus/utils@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.9.1.tgz#9b78849a2be5e3023580b800409aae36a0da6dc8" + integrity sha512-YAL4yhhWLl9DXuf5MVig260a6INz4MehrBGFU/CZu8yXmRiYEuQvRFWh9ZsjfAOyaG7za1MNmBVZ4VVAi/CiJA== dependencies: - "@docusaurus/logger" "3.8.1" - "@docusaurus/types" "3.8.1" - "@docusaurus/utils-common" "3.8.1" + "@docusaurus/logger" "3.9.1" + "@docusaurus/types" "3.9.1" + "@docusaurus/utils-common" "3.9.1" escape-string-regexp "^4.0.0" execa "5.1.1" file-loader "^6.2.0" @@ -2638,6 +2678,50 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@jsonjoy.com/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" + integrity sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA== + +"@jsonjoy.com/buffers@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz#ade6895b7d3883d70f87b5743efaa12c71dfef7a" + integrity sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q== + +"@jsonjoy.com/codegen@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz#5c23f796c47675f166d23b948cdb889184b93207" + integrity sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g== + +"@jsonjoy.com/json-pack@^1.11.0": + version "1.14.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.14.0.tgz#eda5255ccdaeafb3aa811ff1ae4814790b958b4f" + integrity sha512-LpWbYgVnKzphN5S6uss4M25jJ/9+m6q6UJoeN6zTkK4xAGhKsiBRPVeF7OYMWonn5repMQbE5vieRXcMUrKDKw== + dependencies: + "@jsonjoy.com/base64" "^1.1.2" + "@jsonjoy.com/buffers" "^1.0.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@jsonjoy.com/json-pointer" "^1.0.1" + "@jsonjoy.com/util" "^1.9.0" + hyperdyperid "^1.2.0" + thingies "^2.5.0" + +"@jsonjoy.com/json-pointer@^1.0.1": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz#049cb530ac24e84cba08590c5e36b431c4843408" + integrity sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg== + dependencies: + "@jsonjoy.com/codegen" "^1.0.0" + "@jsonjoy.com/util" "^1.9.0" + +"@jsonjoy.com/util@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.9.0.tgz#7ee95586aed0a766b746cd8d8363e336c3c47c46" + integrity sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ== + dependencies: + "@jsonjoy.com/buffers" "^1.0.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@leichtgewicht/ip-codec@^2.0.1": version "2.0.5" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" @@ -2809,6 +2893,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@opentelemetry/api@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" + integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== + "@parcel/watcher-android-arm64@2.5.1": version "2.5.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz#507f836d7e2042f798c7d07ad19c3546f9848ac1" @@ -3010,6 +3099,11 @@ micromark-util-character "^1.1.0" micromark-util-symbol "^1.0.1" +"@standard-schema/spec@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.0.0.tgz#f193b73dc316c4170f2e82a881da0f550d551b9c" + integrity sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA== + "@svgr/babel-plugin-add-jsx-attribute@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz#4001f5d5dd87fa13303e36ee106e3ff3a7eb8b22" @@ -3143,14 +3237,14 @@ "@types/connect" "*" "@types/node" "*" -"@types/bonjour@^3.5.9": +"@types/bonjour@^3.5.13", "@types/bonjour@^3.5.9": version "3.5.13" resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.13.tgz#adf90ce1a105e81dd1f9c61fdc5afda1bfb92956" integrity sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== dependencies: "@types/node" "*" -"@types/connect-history-api-fallback@^1.3.5": +"@types/connect-history-api-fallback@^1.3.5", "@types/connect-history-api-fallback@^1.5.4": version "1.5.4" resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3" integrity sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== @@ -3420,7 +3514,7 @@ "@types/range-parser" "*" "@types/send" "*" -"@types/express-serve-static-core@^4.17.33": +"@types/express-serve-static-core@^4.17.21", "@types/express-serve-static-core@^4.17.33": version "4.19.6" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz#e01324c2a024ff367d92c66f48553ced0ab50267" integrity sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A== @@ -3449,6 +3543,16 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/express@^4.17.21": + version "4.17.23" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.23.tgz#35af3193c640bfd4d7fe77191cd0ed411a433bef" + integrity sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + "@types/geojson@*": version "7946.0.16" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.16.tgz#8ebe53d69efada7044454e3305c19017d97ced2a" @@ -3658,6 +3762,11 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/retry@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" + integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + "@types/sax@^1.2.1": version "1.2.7" resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.7.tgz#ba5fe7df9aa9c89b6dff7688a19023dd2963091d" @@ -3673,7 +3782,7 @@ "@types/mime" "^1" "@types/node" "*" -"@types/serve-index@^1.9.1": +"@types/serve-index@^1.9.1", "@types/serve-index@^1.9.4": version "1.9.4" resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.4.tgz#e6ae13d5053cb06ed36392110b4f9a49ac4ec898" integrity sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== @@ -3689,7 +3798,16 @@ "@types/node" "*" "@types/send" "*" -"@types/sockjs@^0.3.33": +"@types/serve-static@^1.15.5": + version "1.15.8" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.8.tgz#8180c3fbe4a70e8f00b9f70b9ba7f08f35987877" + integrity sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + +"@types/sockjs@^0.3.33", "@types/sockjs@^0.3.36": version "0.3.36" resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" integrity sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== @@ -3711,7 +3829,7 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4" integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== -"@types/ws@^8.5.5": +"@types/ws@^8.5.10", "@types/ws@^8.5.5": version "8.18.1" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.1.tgz#48464e4bf2ddfd17db13d845467f6070ffea4aa9" integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== @@ -3909,6 +4027,16 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" +ai@5.0.59, ai@^5.0.30: + version "5.0.59" + resolved "https://registry.yarnpkg.com/ai/-/ai-5.0.59.tgz#2be5e3adff1916c0bab70f2d11b84431c54f4dbb" + integrity sha512-SuAFxKXt2Ha9FiXB3gaOITkOg9ek/3QNVatGVExvTT4gNXc+hJpuNe1dmuwf6Z5Op4fzc8wdbsrYP27ZCXBzlw== + dependencies: + "@ai-sdk/gateway" "1.0.32" + "@ai-sdk/provider" "2.0.0" + "@ai-sdk/provider-utils" "3.0.10" + "@opentelemetry/api" "1.9.0" + ajv-draft-04@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz#3b64761b268ba0b9e668f0b41ba53fce0ad77fc8" @@ -3963,31 +4091,32 @@ ajv@^8.0.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -algoliasearch-helper@^3.22.6: - version "3.25.0" - resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.25.0.tgz#15cc79ad7909db66b8bb5a5a9c38b40e3941fa2f" - integrity sha512-vQoK43U6HXA9/euCqLjvyNdM4G2Fiu/VFp4ae0Gau9sZeIKBPvUPnXfLYAe65Bg7PFuw03coeu5K6lTPSXRObw== +algoliasearch-helper@^3.26.0: + version "3.26.0" + resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.26.0.tgz#d6e283396a9fc5bf944f365dc3b712570314363f" + integrity sha512-Rv2x3GXleQ3ygwhkhJubhhYGsICmShLAiqtUuJTUkr9uOCOXyF2E71LVT4XDnVffbknv8XgScP4U0Oxtgm+hIw== dependencies: "@algolia/events" "^4.0.1" -algoliasearch@^5.14.2, algoliasearch@^5.17.1: - version "5.25.0" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-5.25.0.tgz#7337b097deadeca0e6e985c0f8724abea189994f" - integrity sha512-n73BVorL4HIwKlfJKb4SEzAYkR3Buwfwbh+MYxg2mloFph2fFGV58E90QTzdbfzWrLn4HE5Czx/WTjI8fcHaMg== - dependencies: - "@algolia/client-abtesting" "5.25.0" - "@algolia/client-analytics" "5.25.0" - "@algolia/client-common" "5.25.0" - "@algolia/client-insights" "5.25.0" - "@algolia/client-personalization" "5.25.0" - "@algolia/client-query-suggestions" "5.25.0" - "@algolia/client-search" "5.25.0" - "@algolia/ingestion" "1.25.0" - "@algolia/monitoring" "1.25.0" - "@algolia/recommend" "5.25.0" - "@algolia/requester-browser-xhr" "5.25.0" - "@algolia/requester-fetch" "5.25.0" - "@algolia/requester-node-http" "5.25.0" +algoliasearch@^5.28.0, algoliasearch@^5.37.0: + version "5.39.0" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-5.39.0.tgz#4c1b1091125c935cd3a6a0d7fc9558b82f66664d" + integrity sha512-DzTfhUxzg9QBNGzU/0kZkxEV72TeA4MmPJ7RVfLnQwHNhhliPo7ynglEWJS791rNlLFoTyrKvkapwr/P3EXV9A== + dependencies: + "@algolia/abtesting" "1.5.0" + "@algolia/client-abtesting" "5.39.0" + "@algolia/client-analytics" "5.39.0" + "@algolia/client-common" "5.39.0" + "@algolia/client-insights" "5.39.0" + "@algolia/client-personalization" "5.39.0" + "@algolia/client-query-suggestions" "5.39.0" + "@algolia/client-search" "5.39.0" + "@algolia/ingestion" "1.39.0" + "@algolia/monitoring" "1.39.0" + "@algolia/recommend" "5.39.0" + "@algolia/requester-browser-xhr" "5.39.0" + "@algolia/requester-fetch" "5.39.0" + "@algolia/requester-node-http" "5.39.0" allof-merge@^0.6.6: version "0.6.6" @@ -4196,7 +4325,7 @@ body-parser@1.20.3: type-is "~1.6.18" unpipe "1.0.0" -bonjour-service@^1.0.11: +bonjour-service@^1.0.11, bonjour-service@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.3.0.tgz#80d867430b5a0da64e82a8047fc1e355bdb71722" integrity sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA== @@ -4292,6 +4421,13 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== + dependencies: + run-applescript "^7.0.0" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -4503,7 +4639,7 @@ chevrotain@~11.0.3: "@chevrotain/utils" "11.0.3" lodash-es "4.17.21" -chokidar@^3.4.2, chokidar@^3.5.3: +chokidar@^3.4.2, chokidar@^3.5.3, chokidar@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -4786,7 +4922,7 @@ cookie@0.7.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== -copy-text-to-clipboard@^3.1.0, copy-text-to-clipboard@^3.2.0: +copy-text-to-clipboard@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz#0202b2d9bdae30a49a53f898626dcc3b49ad960b" integrity sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q== @@ -5419,6 +5555,19 @@ deepmerge@^4.0.0, deepmerge@^4.2.2, deepmerge@^4.3.1: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== + +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== + dependencies: + bundle-name "^4.1.0" + default-browser-id "^5.0.0" + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -5445,6 +5594,11 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" @@ -5485,7 +5639,7 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== -dequal@^2.0.0: +dequal@^2.0.0, dequal@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== @@ -6010,6 +6164,11 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +eventsource-parser@^3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.6.tgz#292e165e34cacbc936c3c92719ef326d4aeb4e90" + integrity sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg== + execa@5.1.1, execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -6030,7 +6189,7 @@ exenv@^1.2.0: resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" integrity sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw== -express@^4.17.3: +express@^4.17.3, express@^4.21.2: version "4.21.2" resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== @@ -6402,6 +6561,11 @@ glob-parent@^6.0.1: dependencies: is-glob "^4.0.3" +glob-to-regex.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/glob-to-regex.js/-/glob-to-regex.js-1.0.1.tgz#f71cc9cb8441471a9318626160bc8a35e1306b21" + integrity sha512-CG/iEvgQqfzoVsMUbxSJcwbG2JwyZ3naEqPkeltwl0BSS8Bp83k3xlGms+0QdWFUAwV+uvo80wNswKF6FWEkKg== + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -6928,7 +7092,7 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.10.tgz#b3277bd6d7ed5588e20ea73bf724fcbe44609075" integrity sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA== -http-proxy-middleware@^2.0.3: +http-proxy-middleware@^2.0.3, http-proxy-middleware@^2.0.9: version "2.0.9" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz#e9e63d68afaa4eee3d147f39149ab84c0c2815ef" integrity sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q== @@ -6979,6 +7143,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -7128,7 +7297,7 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -ipaddr.js@^2.0.1: +ipaddr.js@^2.0.1, ipaddr.js@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== @@ -7187,6 +7356,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extendable@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -7214,6 +7388,13 @@ is-hexadecimal@^2.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027" integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -7222,6 +7403,11 @@ is-installed-globally@^0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" +is-network-error@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-network-error/-/is-network-error-1.3.0.tgz#2ce62cbca444abd506f8a900f39d20b898d37512" + integrity sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw== + is-npm@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-6.0.0.tgz#b59e75e8915543ca5d881ecff864077cba095261" @@ -7296,6 +7482,13 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + is-yarn-global@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.1.tgz#b312d902b313f81e4eaf98b6361ba2b45cd694bb" @@ -7460,6 +7653,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-schema@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + json5@^2.1.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -7546,6 +7744,14 @@ launch-editor@^2.6.0: picocolors "^1.0.0" shell-quote "^1.8.1" +launch-editor@^2.6.1: + version "2.11.1" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.11.1.tgz#61a0b7314a42fd84a6cbb564573d9e9ffcf3d72b" + integrity sha512-SEET7oNfgSaB6Ym0jufAdCeo3meJVeCaaDyzRygy0xsp2BFKCprcfHljTq4QkzTLUxEKkFK6OK4811YM2oSrRg== + dependencies: + picocolors "^1.1.1" + shell-quote "^1.8.3" + layout-base@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-1.0.2.tgz#1291e296883c322a9dd4c5dd82063721b53e26e2" @@ -7729,6 +7935,11 @@ marked@^15.0.7: resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.12.tgz#30722c7346e12d0a2d0207ab9b0c4f0102d86c4e" integrity sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA== +marked@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-16.3.0.tgz#2f513891f867d6edc4772b4a026db9cc331eb94f" + integrity sha512-K3UxuKu6l6bmA5FUwYho8CfJBlsUWAooKtdGgMcERSpF7gcBUrCGsLH7wDaaNOzwq18JzSUDyoEb/YsrqMac3w== + math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" @@ -8117,6 +8328,18 @@ memfs@^3.1.2, memfs@^3.4.3: dependencies: fs-monkey "^1.0.4" +memfs@^4.43.1: + version "4.48.1" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.48.1.tgz#28a9a52d238a90dbec20172f86a9bb3d1923ad1f" + integrity sha512-vWO+1ROkhOALF1UnT9aNOOflq5oFDlqwTXaPg6duo07fBLxSH0+bcF0TY1lbA1zTNKyGgDxgaDdKx5MaewLX5A== + dependencies: + "@jsonjoy.com/json-pack" "^1.11.0" + "@jsonjoy.com/util" "^1.9.0" + glob-to-regex.js "^1.0.1" + thingies "^2.5.0" + tree-dump "^1.0.3" + tslib "^2.0.0" + memoize-one@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -8866,7 +9089,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -"mime-db@>= 1.43.0 < 2": +"mime-db@>= 1.43.0 < 2", mime-db@^1.54.0: version "1.54.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.54.0.tgz#cddb3ee4f9c64530dff640236661d42cb6a314f5" integrity sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ== @@ -8897,6 +9120,13 @@ mime-types@2.1.35, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, m dependencies: mime-db "1.52.0" +mime-types@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.1.tgz#b1d94d6997a9b32fd69ebaed0db73de8acb519ce" + integrity sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA== + dependencies: + mime-db "^1.54.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -9234,7 +9464,7 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -on-finished@2.4.1: +on-finished@2.4.1, on-finished@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== @@ -9260,6 +9490,16 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^10.0.3: + version "10.2.0" + resolved "https://registry.yarnpkg.com/open/-/open-10.2.0.tgz#b9d855be007620e80b6fb05fac98141fe62db73c" + integrity sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA== + dependencies: + default-browser "^5.2.1" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + wsl-utils "^0.1.0" + open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -9372,6 +9612,15 @@ p-retry@^4.5.0: "@types/retry" "0.12.0" retry "^0.13.1" +p-retry@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-6.2.1.tgz#81828f8dc61c6ef5a800585491572cc9892703af" + integrity sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ== + dependencies: + "@types/retry" "0.12.2" + is-network-error "^1.0.0" + retry "^0.13.1" + p-timeout@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -11204,6 +11453,11 @@ rtlcss@^4.1.0: postcss "^8.4.21" strip-json-comments "^3.1.1" +run-applescript@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.1.0.tgz#2e9e54c4664ec3106c5b5630e249d3d6595c4911" + integrity sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -11291,7 +11545,7 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^4.0.0, schema-utils@^4.0.1, schema-utils@^4.3.0, schema-utils@^4.3.2: +schema-utils@^4.0.0, schema-utils@^4.0.1, schema-utils@^4.2.0, schema-utils@^4.3.0, schema-utils@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae" integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ== @@ -11314,7 +11568,7 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== -selfsigned@^2.1.1: +selfsigned@^2.1.1, selfsigned@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== @@ -11457,6 +11711,11 @@ shell-quote@^1.7.3, shell-quote@^1.8.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a" integrity sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA== +shell-quote@^1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.3.tgz#55e40ef33cf5c689902353a3d8cd1a6725f08b4b" + integrity sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw== + shelljs@0.8.5, shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -11904,6 +12163,14 @@ swagger2openapi@7.0.8, swagger2openapi@^7.0.8: yaml "^1.10.0" yargs "^17.0.1" +swr@^2.2.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/swr/-/swr-2.3.6.tgz#5fee0ee8a0762a16871ee371075cb09422b64f50" + integrity sha512-wfHRmHWk/isGNMwlLGlZX5Gzz/uTgo0o2IRuTMcf4CPuPFJZlq0rDaKUx+ozB5nBOReNV1kiOyzMfj+MBMikLw== + dependencies: + dequal "^2.0.3" + use-sync-external-store "^1.4.0" + tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -11954,6 +12221,16 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thingies@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-2.5.0.tgz#5f7b882c933b85989f8466b528a6247a6881e04f" + integrity sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw== + +throttleit@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-2.1.0.tgz#a7e4aa0bf4845a5bd10daa39ea0c783f631a07b4" + integrity sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw== + thunky@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" @@ -12001,6 +12278,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-dump@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.1.0.tgz#ab29129169dc46004414f5a9d4a3c6e89f13e8a4" + integrity sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA== + trim-lines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338" @@ -12021,7 +12303,7 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -tslib@^2.0.3, tslib@^2.4.0, tslib@^2.6.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.4.0, tslib@^2.6.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -12292,6 +12574,11 @@ use-editable@^2.3.3: resolved "https://registry.yarnpkg.com/use-editable/-/use-editable-2.3.3.tgz#a292fe9ba4c291cd28d1cc2728c75a5fc8d9a33f" integrity sha512-7wVD2JbfAFJ3DK0vITvXBdpd9JAz5BcKAAolsnLBuBn6UDDwBGuCIAGvR3yA2BNKm578vAMVHFCWaOcA+BhhiA== +use-sync-external-store@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz#55122e2a3edd2a6c106174c27485e0fd59bcfca0" + integrity sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A== + util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -12535,6 +12822,18 @@ webpack-dev-middleware@^5.3.4: range-parser "^1.2.1" schema-utils "^4.0.0" +webpack-dev-middleware@^7.4.2: + version "7.4.5" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-7.4.5.tgz#d4e8720aa29cb03bc158084a94edb4594e3b7ac0" + integrity sha512-uxQ6YqGdE4hgDKNf7hUiPXOdtkXvBJXrfEGYSx7P7LC8hnUYGK70X6xQXUvXeNyBDDcsiQXpG2m3G9vxowaEuA== + dependencies: + colorette "^2.0.10" + memfs "^4.43.1" + mime-types "^3.0.1" + on-finished "^2.4.1" + range-parser "^1.2.1" + schema-utils "^4.0.0" + webpack-dev-server@^4.15.2: version "4.15.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz#9e0c70a42a012560860adb186986da1248333173" @@ -12571,6 +12870,40 @@ webpack-dev-server@^4.15.2: webpack-dev-middleware "^5.3.4" ws "^8.13.0" +webpack-dev-server@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-5.2.2.tgz#96a143d50c58fef0c79107e61df911728d7ceb39" + integrity sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg== + dependencies: + "@types/bonjour" "^3.5.13" + "@types/connect-history-api-fallback" "^1.5.4" + "@types/express" "^4.17.21" + "@types/express-serve-static-core" "^4.17.21" + "@types/serve-index" "^1.9.4" + "@types/serve-static" "^1.15.5" + "@types/sockjs" "^0.3.36" + "@types/ws" "^8.5.10" + ansi-html-community "^0.0.8" + bonjour-service "^1.2.1" + chokidar "^3.6.0" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + express "^4.21.2" + graceful-fs "^4.2.6" + http-proxy-middleware "^2.0.9" + ipaddr.js "^2.1.0" + launch-editor "^2.6.1" + open "^10.0.3" + p-retry "^6.2.0" + schema-utils "^4.2.0" + selfsigned "^2.4.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^7.4.2" + ws "^8.18.0" + webpack-merge@^5.9.0: version "5.10.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" @@ -12750,6 +13083,18 @@ ws@^8.13.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a" integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ== +ws@^8.18.0: + version "8.18.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" + integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== + +wsl-utils@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/wsl-utils/-/wsl-utils-0.1.0.tgz#8783d4df671d4d50365be2ee4c71917a0557baab" + integrity sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw== + dependencies: + is-wsl "^3.1.0" + xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" @@ -12822,6 +13167,11 @@ yocto-queue@^1.0.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.2.1.tgz#36d7c4739f775b3cbc28e6136e21aa057adec418" integrity sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg== +zod@^4.1.8: + version "4.1.11" + resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5" + integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg== + zwitch@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" diff --git a/local/path/values.tmpl.yaml b/local/path/values.tmpl.yaml index 02a698996..481fa275d 100644 --- a/local/path/values.tmpl.yaml +++ b/local/path/values.tmpl.yaml @@ -59,5 +59,5 @@ guard: pullPolicy: Always config: envoyGateway: - extensionApis: null - extensionManager: null + extensionApis: {} + extensionManager: {} diff --git a/portal-db/Makefile b/portal-db/Makefile index c6304cd1e..d7fd1081d 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -1,5 +1,33 @@ # Portal DB API Makefile +# Color definitions +CYAN := \033[0;36m +BOLD := \033[1m +RESET := \033[0m + +# ============================================================================ +# HELP +# ============================================================================ + +.PHONY: help +.DEFAULT_GOAL := help +help: ## Show all available targets + @echo "" + @echo "$(BOLD)$(CYAN)๐Ÿ—„๏ธ Portal DB Makefile Targets$(RESET)" + @echo "" + @echo "$(BOLD)=== ๐Ÿš€ Service Management ===$(RESET)" + @grep -h -E '^(postgrest-up|postgrest-down|postgrest-logs|portal-db-up|portal-db-down):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' + @echo "" + @echo "$(BOLD)=== ๐Ÿ“ API Generation ===$(RESET)" + @grep -h -E '^(generate-openapi|generate-sdks|generate-all):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' + @echo "" + @echo "$(BOLD)=== ๐Ÿ” Authentication & Testing ===$(RESET)" + @grep -h -E '^(test-auth|test-portal-app|gen-jwt|reset-dev-db):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' + @echo "" + @echo "$(BOLD)=== ๐Ÿ’ง Data Hydration ===$(RESET)" + @grep -h -E '^(hydrate-testdata|hydrate-services|hydrate-applications|hydrate-gateways|hydrate-prod):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' + @echo "" + # ============================================================================ # SERVICE MANAGEMENT # ============================================================================ From 42b636471c3f7f9e3847178c5f1b78f876264bbe Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:16:30 -0700 Subject: [PATCH 23/43] Update docasurus --- docusaurus/docusaurus.config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js index 415ae0601..1bd117ec1 100644 --- a/docusaurus/docusaurus.config.js +++ b/docusaurus/docusaurus.config.js @@ -14,9 +14,6 @@ const config = { markdown: { mermaid: true, - hooks: { - onBrokenMarkdownLinks: "warn", - }, }, themes: [ "@docusaurus/theme-mermaid", From 5336763ae344a96b10c0d656d4202000eed5b1d3 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:38:12 -0700 Subject: [PATCH 24/43] WIP --- deleteme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 deleteme.md diff --git a/deleteme.md b/deleteme.md new file mode 100644 index 000000000..e69de29bb From 4e9a3a7f9356fe820d692701bc699330ebf81a9d Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:42:24 -0700 Subject: [PATCH 25/43] Remove all the .ts files --- .../typescript/src/apis/ApplicationsApi.ts | 397 -------------- .../sdk/typescript/src/apis/GatewaysApi.ts | 367 ------------- .../typescript/src/apis/IntrospectionApi.ts | 51 -- .../sdk/typescript/src/apis/NetworksApi.ts | 277 ---------- .../typescript/src/apis/OrganizationsApi.ts | 337 ------------ .../typescript/src/apis/PortalAccountsApi.ts | 487 ------------------ .../src/apis/PortalApplicationsApi.ts | 472 ----------------- .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 ------------- .../src/apis/RpcCreatePortalApplicationApi.ts | 184 ------- portal-db/sdk/typescript/src/apis/RpcMeApi.ts | 102 ---- .../src/apis/ServiceEndpointsApi.ts | 337 ------------ .../src/apis/ServiceFallbacksApi.ts | 337 ------------ .../sdk/typescript/src/apis/ServicesApi.ts | 487 ------------------ portal-db/sdk/typescript/src/apis/index.ts | 15 - portal-db/sdk/typescript/src/index.ts | 5 - .../sdk/typescript/src/models/Applications.ts | 139 ----- .../sdk/typescript/src/models/Gateways.ts | 121 ----- .../sdk/typescript/src/models/Networks.ts | 67 --- .../typescript/src/models/Organizations.ts | 100 ---- .../typescript/src/models/PortalAccounts.ts | 196 ------- .../src/models/PortalApplications.ts | 185 ------- .../sdk/typescript/src/models/PortalPlans.ts | 119 ----- .../RpcCreatePortalApplicationPostRequest.ts | 142 ----- .../typescript/src/models/ServiceEndpoints.ts | 116 ----- .../typescript/src/models/ServiceFallbacks.ts | 102 ---- .../sdk/typescript/src/models/Services.ts | 182 ------- portal-db/sdk/typescript/src/models/index.ts | 13 - portal-db/sdk/typescript/src/runtime.ts | 432 ---------------- portal-db/sdk/typescript/tsconfig.json | 20 - 29 files changed, 6141 deletions(-) delete mode 100644 portal-db/sdk/typescript/src/apis/ApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/GatewaysApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcMeApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/index.ts delete mode 100644 portal-db/sdk/typescript/src/index.ts delete mode 100644 portal-db/sdk/typescript/src/models/Applications.ts delete mode 100644 portal-db/sdk/typescript/src/models/Gateways.ts delete mode 100644 portal-db/sdk/typescript/src/models/Networks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Services.ts delete mode 100644 portal-db/sdk/typescript/src/models/index.ts delete mode 100644 portal-db/sdk/typescript/src/runtime.ts delete mode 100644 portal-db/sdk/typescript/tsconfig.json diff --git a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts deleted file mode 100644 index a7a0827f0..000000000 --- a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts +++ /dev/null @@ -1,397 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Applications, -} from '../models/index'; -import { - ApplicationsFromJSON, - ApplicationsToJSON, -} from '../models/index'; - -export interface ApplicationsDeleteRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ApplicationsDeletePreferEnum; -} - -export interface ApplicationsGetRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ApplicationsGetPreferEnum; -} - -export interface ApplicationsPatchRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ApplicationsPatchPreferEnum; - applications?: Applications; -} - -export interface ApplicationsPostRequest { - select?: string; - prefer?: ApplicationsPostPreferEnum; - applications?: Applications; -} - -/** - * - */ -export class ApplicationsApi extends runtime.BaseAPI { - - /** - * Onchain applications for processing relays through the network - */ - async applicationsDeleteRaw(requestParameters: ApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsDelete(requestParameters: ApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsGetRaw(requestParameters: ApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationsFromJSON)); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsGet(requestParameters: ApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.applicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPatchRaw(requestParameters: ApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ApplicationsToJSON(requestParameters['applications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPatch(requestParameters: ApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPostRaw(requestParameters: ApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ApplicationsToJSON(requestParameters['applications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPost(requestParameters: ApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ApplicationsDeletePreferEnum = typeof ApplicationsDeletePreferEnum[keyof typeof ApplicationsDeletePreferEnum]; -/** - * @export - */ -export const ApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ApplicationsGetPreferEnum = typeof ApplicationsGetPreferEnum[keyof typeof ApplicationsGetPreferEnum]; -/** - * @export - */ -export const ApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ApplicationsPatchPreferEnum = typeof ApplicationsPatchPreferEnum[keyof typeof ApplicationsPatchPreferEnum]; -/** - * @export - */ -export const ApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ApplicationsPostPreferEnum = typeof ApplicationsPostPreferEnum[keyof typeof ApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts deleted file mode 100644 index bbfc5f024..000000000 --- a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts +++ /dev/null @@ -1,367 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Gateways, -} from '../models/index'; -import { - GatewaysFromJSON, - GatewaysToJSON, -} from '../models/index'; - -export interface GatewaysDeleteRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - prefer?: GatewaysDeletePreferEnum; -} - -export interface GatewaysGetRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: GatewaysGetPreferEnum; -} - -export interface GatewaysPatchRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - prefer?: GatewaysPatchPreferEnum; - gateways?: Gateways; -} - -export interface GatewaysPostRequest { - select?: string; - prefer?: GatewaysPostPreferEnum; - gateways?: Gateways; -} - -/** - * - */ -export class GatewaysApi extends runtime.BaseAPI { - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysDeleteRaw(requestParameters: GatewaysDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysDelete(requestParameters: GatewaysDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysDeleteRaw(requestParameters, initOverrides); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysGetRaw(requestParameters: GatewaysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GatewaysFromJSON)); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysGet(requestParameters: GatewaysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.gatewaysGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPatchRaw(requestParameters: GatewaysPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: GatewaysToJSON(requestParameters['gateways']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPatch(requestParameters: GatewaysPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysPatchRaw(requestParameters, initOverrides); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPostRaw(requestParameters: GatewaysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GatewaysToJSON(requestParameters['gateways']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPost(requestParameters: GatewaysPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const GatewaysDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type GatewaysDeletePreferEnum = typeof GatewaysDeletePreferEnum[keyof typeof GatewaysDeletePreferEnum]; -/** - * @export - */ -export const GatewaysGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type GatewaysGetPreferEnum = typeof GatewaysGetPreferEnum[keyof typeof GatewaysGetPreferEnum]; -/** - * @export - */ -export const GatewaysPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type GatewaysPatchPreferEnum = typeof GatewaysPatchPreferEnum[keyof typeof GatewaysPatchPreferEnum]; -/** - * @export - */ -export const GatewaysPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type GatewaysPostPreferEnum = typeof GatewaysPostPreferEnum[keyof typeof GatewaysPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts deleted file mode 100644 index b654b5e25..000000000 --- a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -/** - * - */ -export class IntrospectionApi extends runtime.BaseAPI { - - /** - * OpenAPI description (this document) - */ - async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * OpenAPI description (this document) - */ - async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rootGetRaw(initOverrides); - } - -} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts deleted file mode 100644 index 7ed2eea64..000000000 --- a/portal-db/sdk/typescript/src/apis/NetworksApi.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Networks, -} from '../models/index'; -import { - NetworksFromJSON, - NetworksToJSON, -} from '../models/index'; - -export interface NetworksDeleteRequest { - networkId?: string; - prefer?: NetworksDeletePreferEnum; -} - -export interface NetworksGetRequest { - networkId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: NetworksGetPreferEnum; -} - -export interface NetworksPatchRequest { - networkId?: string; - prefer?: NetworksPatchPreferEnum; - networks?: Networks; -} - -export interface NetworksPostRequest { - select?: string; - prefer?: NetworksPostPreferEnum; - networks?: Networks; -} - -/** - * - */ -export class NetworksApi extends runtime.BaseAPI { - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.networksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const NetworksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; -/** - * @export - */ -export const NetworksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; -/** - * @export - */ -export const NetworksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; -/** - * @export - */ -export const NetworksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts deleted file mode 100644 index 9944fa2cd..000000000 --- a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Organizations, -} from '../models/index'; -import { - OrganizationsFromJSON, - OrganizationsToJSON, -} from '../models/index'; - -export interface OrganizationsDeleteRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsDeletePreferEnum; -} - -export interface OrganizationsGetRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: OrganizationsGetPreferEnum; -} - -export interface OrganizationsPatchRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsPatchPreferEnum; - organizations?: Organizations; -} - -export interface OrganizationsPostRequest { - select?: string; - prefer?: OrganizationsPostPreferEnum; - organizations?: Organizations; -} - -/** - * - */ -export class OrganizationsApi extends runtime.BaseAPI { - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.organizationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const OrganizationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; -/** - * @export - */ -export const OrganizationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; -/** - * @export - */ -export const OrganizationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; -/** - * @export - */ -export const OrganizationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts deleted file mode 100644 index f7db3d925..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccounts, -} from '../models/index'; -import { - PortalAccountsFromJSON, - PortalAccountsToJSON, -} from '../models/index'; - -export interface PortalAccountsDeleteRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsDeletePreferEnum; -} - -export interface PortalAccountsGetRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountsGetPreferEnum; -} - -export interface PortalAccountsPatchRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsPatchPreferEnum; - portalAccounts?: PortalAccounts; -} - -export interface PortalAccountsPostRequest { - select?: string; - prefer?: PortalAccountsPostPreferEnum; - portalAccounts?: PortalAccounts; -} - -/** - * - */ -export class PortalAccountsApi extends runtime.BaseAPI { - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPatchRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; -/** - * @export - */ -export const PortalAccountsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts deleted file mode 100644 index 4161669cc..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplications, -} from '../models/index'; -import { - PortalApplicationsFromJSON, - PortalApplicationsToJSON, -} from '../models/index'; - -export interface PortalApplicationsDeleteRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsDeletePreferEnum; -} - -export interface PortalApplicationsGetRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationsGetPreferEnum; -} - -export interface PortalApplicationsPatchRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsPatchPreferEnum; - portalApplications?: PortalApplications; -} - -export interface PortalApplicationsPostRequest { - select?: string; - prefer?: PortalApplicationsPostPreferEnum; - portalApplications?: PortalApplications; -} - -/** - * - */ -export class PortalApplicationsApi extends runtime.BaseAPI { - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts deleted file mode 100644 index 6400389ad..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalPlans, -} from '../models/index'; -import { - PortalPlansFromJSON, - PortalPlansToJSON, -} from '../models/index'; - -export interface PortalPlansDeleteRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansDeletePreferEnum; -} - -export interface PortalPlansGetRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalPlansGetPreferEnum; -} - -export interface PortalPlansPatchRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansPatchPreferEnum; - portalPlans?: PortalPlans; -} - -export interface PortalPlansPostRequest { - select?: string; - prefer?: PortalPlansPostPreferEnum; - portalPlans?: PortalPlans; -} - -/** - * - */ -export class PortalPlansApi extends runtime.BaseAPI { - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalPlansGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPatchRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalPlansDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; -/** - * @export - */ -export const PortalPlansGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; -/** - * @export - */ -export const PortalPlansPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; -/** - * @export - */ -export const PortalPlansPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts deleted file mode 100644 index b4f1682ae..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcCreatePortalApplicationPostRequest, -} from '../models/index'; -import { - RpcCreatePortalApplicationPostRequestFromJSON, - RpcCreatePortalApplicationPostRequestToJSON, -} from '../models/index'; - -export interface RpcCreatePortalApplicationGetRequest { - pPortalAccountId: string; - pPortalUserId: string; - pPortalApplicationName?: string; - pEmoji?: string; - pPortalApplicationUserLimit?: number; - pPortalApplicationUserLimitInterval?: string; - pPortalApplicationUserLimitRps?: number; - pPortalApplicationDescription?: string; - pFavoriteServiceIds?: string; - pSecretKeyRequired?: string; -} - -export interface RpcCreatePortalApplicationPostOperationRequest { - rpcCreatePortalApplicationPostRequest: RpcCreatePortalApplicationPostRequest; - prefer?: RpcCreatePortalApplicationPostOperationPreferEnum; -} - -/** - * - */ -export class RpcCreatePortalApplicationApi extends runtime.BaseAPI { - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationGetRaw(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['pPortalAccountId'] == null) { - throw new runtime.RequiredError( - 'pPortalAccountId', - 'Required parameter "pPortalAccountId" was null or undefined when calling rpcCreatePortalApplicationGet().' - ); - } - - if (requestParameters['pPortalUserId'] == null) { - throw new runtime.RequiredError( - 'pPortalUserId', - 'Required parameter "pPortalUserId" was null or undefined when calling rpcCreatePortalApplicationGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['pPortalAccountId'] != null) { - queryParameters['p_portal_account_id'] = requestParameters['pPortalAccountId']; - } - - if (requestParameters['pPortalUserId'] != null) { - queryParameters['p_portal_user_id'] = requestParameters['pPortalUserId']; - } - - if (requestParameters['pPortalApplicationName'] != null) { - queryParameters['p_portal_application_name'] = requestParameters['pPortalApplicationName']; - } - - if (requestParameters['pEmoji'] != null) { - queryParameters['p_emoji'] = requestParameters['pEmoji']; - } - - if (requestParameters['pPortalApplicationUserLimit'] != null) { - queryParameters['p_portal_application_user_limit'] = requestParameters['pPortalApplicationUserLimit']; - } - - if (requestParameters['pPortalApplicationUserLimitInterval'] != null) { - queryParameters['p_portal_application_user_limit_interval'] = requestParameters['pPortalApplicationUserLimitInterval']; - } - - if (requestParameters['pPortalApplicationUserLimitRps'] != null) { - queryParameters['p_portal_application_user_limit_rps'] = requestParameters['pPortalApplicationUserLimitRps']; - } - - if (requestParameters['pPortalApplicationDescription'] != null) { - queryParameters['p_portal_application_description'] = requestParameters['pPortalApplicationDescription']; - } - - if (requestParameters['pFavoriteServiceIds'] != null) { - queryParameters['p_favorite_service_ids'] = requestParameters['pFavoriteServiceIds']; - } - - if (requestParameters['pSecretKeyRequired'] != null) { - queryParameters['p_secret_key_required'] = requestParameters['pSecretKeyRequired']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/create_portal_application`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationGet(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcCreatePortalApplicationGetRaw(requestParameters, initOverrides); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationPostRaw(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcCreatePortalApplicationPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcCreatePortalApplicationPostRequest', - 'Required parameter "rpcCreatePortalApplicationPostRequest" was null or undefined when calling rpcCreatePortalApplicationPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/create_portal_application`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcCreatePortalApplicationPostRequestToJSON(requestParameters['rpcCreatePortalApplicationPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationPost(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcCreatePortalApplicationPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcCreatePortalApplicationPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcCreatePortalApplicationPostOperationPreferEnum = typeof RpcCreatePortalApplicationPostOperationPreferEnum[keyof typeof RpcCreatePortalApplicationPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts b/portal-db/sdk/typescript/src/apis/RpcMeApi.ts deleted file mode 100644 index a8fdafb41..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -export interface RpcMePostRequest { - body: object; - prefer?: RpcMePostPreferEnum; -} - -/** - * - */ -export class RpcMeApi extends runtime.BaseAPI { - - /** - */ - async rpcMeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/me`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcMeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcMeGetRaw(initOverrides); - } - - /** - */ - async rpcMePostRaw(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling rpcMePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/me`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'] as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcMePost(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcMePostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcMePostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcMePostPreferEnum = typeof RpcMePostPreferEnum[keyof typeof RpcMePostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts deleted file mode 100644 index 9e4f193fc..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceEndpoints, -} from '../models/index'; -import { - ServiceEndpointsFromJSON, - ServiceEndpointsToJSON, -} from '../models/index'; - -export interface ServiceEndpointsDeleteRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsDeletePreferEnum; -} - -export interface ServiceEndpointsGetRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceEndpointsGetPreferEnum; -} - -export interface ServiceEndpointsPatchRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsPatchPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -export interface ServiceEndpointsPostRequest { - select?: string; - prefer?: ServiceEndpointsPostPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -/** - * - */ -export class ServiceEndpointsApi extends runtime.BaseAPI { - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceEndpointsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; -/** - * @export - */ -export const ServiceEndpointsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts deleted file mode 100644 index 1a5f43ac7..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceFallbacks, -} from '../models/index'; -import { - ServiceFallbacksFromJSON, - ServiceFallbacksToJSON, -} from '../models/index'; - -export interface ServiceFallbacksDeleteRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksDeletePreferEnum; -} - -export interface ServiceFallbacksGetRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceFallbacksGetPreferEnum; -} - -export interface ServiceFallbacksPatchRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksPatchPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -export interface ServiceFallbacksPostRequest { - select?: string; - prefer?: ServiceFallbacksPostPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -/** - * - */ -export class ServiceFallbacksApi extends runtime.BaseAPI { - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceFallbacksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; -/** - * @export - */ -export const ServiceFallbacksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts deleted file mode 100644 index 953eda314..000000000 --- a/portal-db/sdk/typescript/src/apis/ServicesApi.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Services, -} from '../models/index'; -import { - ServicesFromJSON, - ServicesToJSON, -} from '../models/index'; - -export interface ServicesDeleteRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesDeletePreferEnum; -} - -export interface ServicesGetRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServicesGetPreferEnum; -} - -export interface ServicesPatchRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesPatchPreferEnum; - services?: Services; -} - -export interface ServicesPostRequest { - select?: string; - prefer?: ServicesPostPreferEnum; - services?: Services; -} - -/** - * - */ -export class ServicesApi extends runtime.BaseAPI { - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.servicesGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServicesDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; -/** - * @export - */ -export const ServicesGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; -/** - * @export - */ -export const ServicesPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; -/** - * @export - */ -export const ServicesPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts deleted file mode 100644 index 3e7698705..000000000 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './ApplicationsApi'; -export * from './GatewaysApi'; -export * from './IntrospectionApi'; -export * from './NetworksApi'; -export * from './OrganizationsApi'; -export * from './PortalAccountsApi'; -export * from './PortalApplicationsApi'; -export * from './PortalPlansApi'; -export * from './RpcCreatePortalApplicationApi'; -export * from './RpcMeApi'; -export * from './ServiceEndpointsApi'; -export * from './ServiceFallbacksApi'; -export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts deleted file mode 100644 index bebe8bbbe..000000000 --- a/portal-db/sdk/typescript/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Applications.ts b/portal-db/sdk/typescript/src/models/Applications.ts deleted file mode 100644 index 036376484..000000000 --- a/portal-db/sdk/typescript/src/models/Applications.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Onchain applications for processing relays through the network - * @export - * @interface Applications - */ -export interface Applications { - /** - * Blockchain address of the application - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Applications - */ - applicationAddress: string; - /** - * Note: - * This is a Foreign Key to `gateways.gateway_address`. - * @type {string} - * @memberof Applications - */ - gatewayAddress: string; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof Applications - */ - serviceId: string; - /** - * - * @type {number} - * @memberof Applications - */ - stakeAmount?: number; - /** - * - * @type {string} - * @memberof Applications - */ - stakeDenom?: string; - /** - * - * @type {string} - * @memberof Applications - */ - applicationPrivateKeyHex?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Applications - */ - networkId: string; - /** - * - * @type {string} - * @memberof Applications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Applications - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Applications interface. - */ -export function instanceOfApplications(value: object): value is Applications { - if (!('applicationAddress' in value) || value['applicationAddress'] === undefined) return false; - if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function ApplicationsFromJSON(json: any): Applications { - return ApplicationsFromJSONTyped(json, false); -} - -export function ApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Applications { - if (json == null) { - return json; - } - return { - - 'applicationAddress': json['application_address'], - 'gatewayAddress': json['gateway_address'], - 'serviceId': json['service_id'], - 'stakeAmount': json['stake_amount'] == null ? undefined : json['stake_amount'], - 'stakeDenom': json['stake_denom'] == null ? undefined : json['stake_denom'], - 'applicationPrivateKeyHex': json['application_private_key_hex'] == null ? undefined : json['application_private_key_hex'], - 'networkId': json['network_id'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ApplicationsToJSON(json: any): Applications { - return ApplicationsToJSONTyped(json, false); -} - -export function ApplicationsToJSONTyped(value?: Applications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'application_address': value['applicationAddress'], - 'gateway_address': value['gatewayAddress'], - 'service_id': value['serviceId'], - 'stake_amount': value['stakeAmount'], - 'stake_denom': value['stakeDenom'], - 'application_private_key_hex': value['applicationPrivateKeyHex'], - 'network_id': value['networkId'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Gateways.ts b/portal-db/sdk/typescript/src/models/Gateways.ts deleted file mode 100644 index 7c713aed1..000000000 --- a/portal-db/sdk/typescript/src/models/Gateways.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Onchain gateway information including stake and network details - * @export - * @interface Gateways - */ -export interface Gateways { - /** - * Blockchain address of the gateway - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Gateways - */ - gatewayAddress: string; - /** - * Amount of tokens staked by the gateway - * @type {number} - * @memberof Gateways - */ - stakeAmount: number; - /** - * - * @type {string} - * @memberof Gateways - */ - stakeDenom: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Gateways - */ - networkId: string; - /** - * - * @type {string} - * @memberof Gateways - */ - gatewayPrivateKeyHex?: string; - /** - * - * @type {string} - * @memberof Gateways - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Gateways - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Gateways interface. - */ -export function instanceOfGateways(value: object): value is Gateways { - if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; - if (!('stakeAmount' in value) || value['stakeAmount'] === undefined) return false; - if (!('stakeDenom' in value) || value['stakeDenom'] === undefined) return false; - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function GatewaysFromJSON(json: any): Gateways { - return GatewaysFromJSONTyped(json, false); -} - -export function GatewaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gateways { - if (json == null) { - return json; - } - return { - - 'gatewayAddress': json['gateway_address'], - 'stakeAmount': json['stake_amount'], - 'stakeDenom': json['stake_denom'], - 'networkId': json['network_id'], - 'gatewayPrivateKeyHex': json['gateway_private_key_hex'] == null ? undefined : json['gateway_private_key_hex'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function GatewaysToJSON(json: any): Gateways { - return GatewaysToJSONTyped(json, false); -} - -export function GatewaysToJSONTyped(value?: Gateways | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'gateway_address': value['gatewayAddress'], - 'stake_amount': value['stakeAmount'], - 'stake_denom': value['stakeDenom'], - 'network_id': value['networkId'], - 'gateway_private_key_hex': value['gatewayPrivateKeyHex'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts deleted file mode 100644 index 8ff34b54a..000000000 --- a/portal-db/sdk/typescript/src/models/Networks.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - * @export - * @interface Networks - */ -export interface Networks { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Networks - */ - networkId: string; -} - -/** - * Check if a given object implements the Networks interface. - */ -export function instanceOfNetworks(value: object): value is Networks { - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function NetworksFromJSON(json: any): Networks { - return NetworksFromJSONTyped(json, false); -} - -export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { - if (json == null) { - return json; - } - return { - - 'networkId': json['network_id'], - }; -} - -export function NetworksToJSON(json: any): Networks { - return NetworksToJSONTyped(json, false); -} - -export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'network_id': value['networkId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts deleted file mode 100644 index 3c35c6a79..000000000 --- a/portal-db/sdk/typescript/src/models/Organizations.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Companies or customer groups that can be attached to Portal Accounts - * @export - * @interface Organizations - */ -export interface Organizations { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof Organizations - */ - organizationId: number; - /** - * Name of the organization - * @type {string} - * @memberof Organizations - */ - organizationName: string; - /** - * Soft delete timestamp - * @type {string} - * @memberof Organizations - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Organizations interface. - */ -export function instanceOfOrganizations(value: object): value is Organizations { - if (!('organizationId' in value) || value['organizationId'] === undefined) return false; - if (!('organizationName' in value) || value['organizationName'] === undefined) return false; - return true; -} - -export function OrganizationsFromJSON(json: any): Organizations { - return OrganizationsFromJSONTyped(json, false); -} - -export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { - if (json == null) { - return json; - } - return { - - 'organizationId': json['organization_id'], - 'organizationName': json['organization_name'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function OrganizationsToJSON(json: any): Organizations { - return OrganizationsToJSONTyped(json, false); -} - -export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'organization_id': value['organizationId'], - 'organization_name': value['organizationName'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts deleted file mode 100644 index ee2b80517..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccounts.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Multi-tenant accounts with plans and billing integration - * @export - * @interface PortalAccounts - */ -export interface PortalAccounts { - /** - * Unique identifier for the portal account - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalAccounts - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `organizations.organization_id`. - * @type {number} - * @memberof PortalAccounts - */ - organizationId?: number; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalAccounts - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - userAccountName?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - internalAccountName?: string; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - billingType?: string; - /** - * Stripe subscription identifier for billing - * @type {string} - * @memberof PortalAccounts - */ - stripeSubscriptionId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpAccountId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalAccountsPortalAccountUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalAccounts interface. - */ -export function instanceOfPortalAccounts(value: object): value is PortalAccounts { - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalAccountsFromJSON(json: any): PortalAccounts { - return PortalAccountsFromJSONTyped(json, false); -} - -export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'], - 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], - 'portalPlanType': json['portal_plan_type'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], - 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], - 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalAccountsToJSON(json: any): PortalAccounts { - return PortalAccountsToJSONTyped(json, false); -} - -export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'organization_id': value['organizationId'], - 'portal_plan_type': value['portalPlanType'], - 'user_account_name': value['userAccountName'], - 'internal_account_name': value['internalAccountName'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], - 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], - 'billing_type': value['billingType'], - 'stripe_subscription_id': value['stripeSubscriptionId'], - 'gcp_account_id': value['gcpAccountId'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts deleted file mode 100644 index 08c5953bc..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplications.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Applications created within portal accounts with their own rate limits and settings - * @export - * @interface PortalApplications - */ -export interface PortalApplications { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalApplications - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalApplications - */ - portalAccountId: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationName?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - emoji?: string; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationDescription?: string; - /** - * - * @type {Array} - * @memberof PortalApplications - */ - favoriteServiceIds?: Array; - /** - * Hashed secret key for application authentication - * @type {string} - * @memberof PortalApplications - */ - secretKeyHash?: string; - /** - * - * @type {boolean} - * @memberof PortalApplications - */ - secretKeyRequired?: boolean; - /** - * - * @type {string} - * @memberof PortalApplications - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalApplications interface. - */ -export function instanceOfPortalApplications(value: object): value is PortalApplications { - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - return true; -} - -export function PortalApplicationsFromJSON(json: any): PortalApplications { - return PortalApplicationsFromJSONTyped(json, false); -} - -export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { - if (json == null) { - return json; - } - return { - - 'portalApplicationId': json['portal_application_id'], - 'portalAccountId': json['portal_account_id'], - 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], - 'emoji': json['emoji'] == null ? undefined : json['emoji'], - 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], - 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], - 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], - 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], - 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], - 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], - 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationsToJSON(json: any): PortalApplications { - return PortalApplicationsToJSONTyped(json, false); -} - -export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_application_id': value['portalApplicationId'], - 'portal_account_id': value['portalAccountId'], - 'portal_application_name': value['portalApplicationName'], - 'emoji': value['emoji'], - 'portal_application_user_limit': value['portalApplicationUserLimit'], - 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], - 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], - 'portal_application_description': value['portalApplicationDescription'], - 'favorite_service_ids': value['favoriteServiceIds'], - 'secret_key_hash': value['secretKeyHash'], - 'secret_key_required': value['secretKeyRequired'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts deleted file mode 100644 index d89b2b209..000000000 --- a/portal-db/sdk/typescript/src/models/PortalPlans.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available subscription plans for Portal Accounts - * @export - * @interface PortalPlans - */ -export interface PortalPlans { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalPlans - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalPlans - */ - portalPlanTypeDescription?: string; - /** - * Maximum usage allowed within the interval - * @type {number} - * @memberof PortalPlans - */ - planUsageLimit?: number; - /** - * - * @type {string} - * @memberof PortalPlans - */ - planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; - /** - * Rate limit in requests per second - * @type {number} - * @memberof PortalPlans - */ - planRateLimitRps?: number; - /** - * - * @type {number} - * @memberof PortalPlans - */ - planApplicationLimit?: number; -} - - -/** - * @export - */ -export const PortalPlansPlanUsageLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalPlans interface. - */ -export function instanceOfPortalPlans(value: object): value is PortalPlans { - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalPlansFromJSON(json: any): PortalPlans { - return PortalPlansFromJSONTyped(json, false); -} - -export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { - if (json == null) { - return json; - } - return { - - 'portalPlanType': json['portal_plan_type'], - 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], - 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], - 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], - 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], - 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], - }; -} - -export function PortalPlansToJSON(json: any): PortalPlans { - return PortalPlansToJSONTyped(json, false); -} - -export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_plan_type': value['portalPlanType'], - 'portal_plan_type_description': value['portalPlanTypeDescription'], - 'plan_usage_limit': value['planUsageLimit'], - 'plan_usage_limit_interval': value['planUsageLimitInterval'], - 'plan_rate_limit_rps': value['planRateLimitRps'], - 'plan_application_limit': value['planApplicationLimit'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts deleted file mode 100644 index df5aa2c30..000000000 --- a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - * Validates user membership in the account before creation. - * Returns the application details including the generated secret key. - * This function is exposed via PostgREST as POST /rpc/create_portal_application - * @export - * @interface RpcCreatePortalApplicationPostRequest - */ -export interface RpcCreatePortalApplicationPostRequest { - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pEmoji?: string; - /** - * - * @type {Array} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pFavoriteServiceIds?: Array; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalAccountId: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationDescription?: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationName?: string; - /** - * - * @type {number} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimitInterval?: string; - /** - * - * @type {number} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalUserId: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pSecretKeyRequired?: string; -} - -/** - * Check if a given object implements the RpcCreatePortalApplicationPostRequest interface. - */ -export function instanceOfRpcCreatePortalApplicationPostRequest(value: object): value is RpcCreatePortalApplicationPostRequest { - if (!('pPortalAccountId' in value) || value['pPortalAccountId'] === undefined) return false; - if (!('pPortalUserId' in value) || value['pPortalUserId'] === undefined) return false; - return true; -} - -export function RpcCreatePortalApplicationPostRequestFromJSON(json: any): RpcCreatePortalApplicationPostRequest { - return RpcCreatePortalApplicationPostRequestFromJSONTyped(json, false); -} - -export function RpcCreatePortalApplicationPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcCreatePortalApplicationPostRequest { - if (json == null) { - return json; - } - return { - - 'pEmoji': json['p_emoji'] == null ? undefined : json['p_emoji'], - 'pFavoriteServiceIds': json['p_favorite_service_ids'] == null ? undefined : json['p_favorite_service_ids'], - 'pPortalAccountId': json['p_portal_account_id'], - 'pPortalApplicationDescription': json['p_portal_application_description'] == null ? undefined : json['p_portal_application_description'], - 'pPortalApplicationName': json['p_portal_application_name'] == null ? undefined : json['p_portal_application_name'], - 'pPortalApplicationUserLimit': json['p_portal_application_user_limit'] == null ? undefined : json['p_portal_application_user_limit'], - 'pPortalApplicationUserLimitInterval': json['p_portal_application_user_limit_interval'] == null ? undefined : json['p_portal_application_user_limit_interval'], - 'pPortalApplicationUserLimitRps': json['p_portal_application_user_limit_rps'] == null ? undefined : json['p_portal_application_user_limit_rps'], - 'pPortalUserId': json['p_portal_user_id'], - 'pSecretKeyRequired': json['p_secret_key_required'] == null ? undefined : json['p_secret_key_required'], - }; -} - -export function RpcCreatePortalApplicationPostRequestToJSON(json: any): RpcCreatePortalApplicationPostRequest { - return RpcCreatePortalApplicationPostRequestToJSONTyped(json, false); -} - -export function RpcCreatePortalApplicationPostRequestToJSONTyped(value?: RpcCreatePortalApplicationPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'p_emoji': value['pEmoji'], - 'p_favorite_service_ids': value['pFavoriteServiceIds'], - 'p_portal_account_id': value['pPortalAccountId'], - 'p_portal_application_description': value['pPortalApplicationDescription'], - 'p_portal_application_name': value['pPortalApplicationName'], - 'p_portal_application_user_limit': value['pPortalApplicationUserLimit'], - 'p_portal_application_user_limit_interval': value['pPortalApplicationUserLimitInterval'], - 'p_portal_application_user_limit_rps': value['pPortalApplicationUserLimitRps'], - 'p_portal_user_id': value['pPortalUserId'], - 'p_secret_key_required': value['pSecretKeyRequired'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts deleted file mode 100644 index 516acad4a..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available endpoint types for each service - * @export - * @interface ServiceEndpoints - */ -export interface ServiceEndpoints { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceEndpoints - */ - endpointId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceEndpoints - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - endpointType?: ServiceEndpointsEndpointTypeEnum; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const ServiceEndpointsEndpointTypeEnum = { - CometBft: 'cometBFT', - Cosmos: 'cosmos', - Rest: 'REST', - JsonRpc: 'JSON-RPC', - Wss: 'WSS', - GRpc: 'gRPC' -} as const; -export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; - - -/** - * Check if a given object implements the ServiceEndpoints interface. - */ -export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { - if (!('endpointId' in value) || value['endpointId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - return true; -} - -export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { - return ServiceEndpointsFromJSONTyped(json, false); -} - -export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { - if (json == null) { - return json; - } - return { - - 'endpointId': json['endpoint_id'], - 'serviceId': json['service_id'], - 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { - return ServiceEndpointsToJSONTyped(json, false); -} - -export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'endpoint_id': value['endpointId'], - 'service_id': value['serviceId'], - 'endpoint_type': value['endpointType'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts deleted file mode 100644 index a10559ad2..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Fallback URLs for services when primary endpoints fail - * @export - * @interface ServiceFallbacks - */ -export interface ServiceFallbacks { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceFallbacks - */ - serviceFallbackId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceFallbacks - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - fallbackUrl: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the ServiceFallbacks interface. - */ -export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { - if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; - return true; -} - -export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { - return ServiceFallbacksFromJSONTyped(json, false); -} - -export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { - if (json == null) { - return json; - } - return { - - 'serviceFallbackId': json['service_fallback_id'], - 'serviceId': json['service_id'], - 'fallbackUrl': json['fallback_url'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { - return ServiceFallbacksToJSONTyped(json, false); -} - -export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_fallback_id': value['serviceFallbackId'], - 'service_id': value['serviceId'], - 'fallback_url': value['fallbackUrl'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts deleted file mode 100644 index c9341fcdb..000000000 --- a/portal-db/sdk/typescript/src/models/Services.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain services from the Pocket Network - * @export - * @interface Services - */ -export interface Services { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Services - */ - serviceId: string; - /** - * - * @type {string} - * @memberof Services - */ - serviceName: string; - /** - * Cost in compute units for each relay - * @type {number} - * @memberof Services - */ - computeUnitsPerRelay?: number; - /** - * Valid domains for this service - * @type {Array} - * @memberof Services - */ - serviceDomains: Array; - /** - * - * @type {string} - * @memberof Services - */ - serviceOwnerAddress?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Services - */ - networkId?: string; - /** - * - * @type {boolean} - * @memberof Services - */ - active?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - beta?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - comingSoon?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - qualityFallbackEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - hardFallbackEnabled?: boolean; - /** - * - * @type {string} - * @memberof Services - */ - svgIcon?: string; - /** - * - * @type {string} - * @memberof Services - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Services interface. - */ -export function instanceOfServices(value: object): value is Services { - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('serviceName' in value) || value['serviceName'] === undefined) return false; - if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; - return true; -} - -export function ServicesFromJSON(json: any): Services { - return ServicesFromJSONTyped(json, false); -} - -export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { - if (json == null) { - return json; - } - return { - - 'serviceId': json['service_id'], - 'serviceName': json['service_name'], - 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], - 'serviceDomains': json['service_domains'], - 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], - 'networkId': json['network_id'] == null ? undefined : json['network_id'], - 'active': json['active'] == null ? undefined : json['active'], - 'beta': json['beta'] == null ? undefined : json['beta'], - 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], - 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], - 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], - 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServicesToJSON(json: any): Services { - return ServicesToJSONTyped(json, false); -} - -export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_id': value['serviceId'], - 'service_name': value['serviceName'], - 'compute_units_per_relay': value['computeUnitsPerRelay'], - 'service_domains': value['serviceDomains'], - 'service_owner_address': value['serviceOwnerAddress'], - 'network_id': value['networkId'], - 'active': value['active'], - 'beta': value['beta'], - 'coming_soon': value['comingSoon'], - 'quality_fallback_enabled': value['qualityFallbackEnabled'], - 'hard_fallback_enabled': value['hardFallbackEnabled'], - 'svg_icon': value['svgIcon'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts deleted file mode 100644 index eda1454eb..000000000 --- a/portal-db/sdk/typescript/src/models/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Applications'; -export * from './Gateways'; -export * from './Networks'; -export * from './Organizations'; -export * from './PortalAccounts'; -export * from './PortalApplications'; -export * from './PortalPlans'; -export * from './RpcCreatePortalApplicationPostRequest'; -export * from './ServiceEndpoints'; -export * from './ServiceFallbacks'; -export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts deleted file mode 100644 index f4d9fba5c..000000000 --- a/portal-db/sdk/typescript/src/runtime.ts +++ /dev/null @@ -1,432 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - -export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json deleted file mode 100644 index 4567ec198..000000000 --- a/portal-db/sdk/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -} From 20895f376370958ccc6d96f37054677a433a72a1 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:43:45 -0700 Subject: [PATCH 26/43] Revert "Remove all the .ts files" This reverts commit 4e9a3a7f9356fe820d692701bc699330ebf81a9d. --- .../typescript/src/apis/ApplicationsApi.ts | 397 ++++++++++++++ .../sdk/typescript/src/apis/GatewaysApi.ts | 367 +++++++++++++ .../typescript/src/apis/IntrospectionApi.ts | 51 ++ .../sdk/typescript/src/apis/NetworksApi.ts | 277 ++++++++++ .../typescript/src/apis/OrganizationsApi.ts | 337 ++++++++++++ .../typescript/src/apis/PortalAccountsApi.ts | 487 ++++++++++++++++++ .../src/apis/PortalApplicationsApi.ts | 472 +++++++++++++++++ .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 +++++++++++++ .../src/apis/RpcCreatePortalApplicationApi.ts | 184 +++++++ portal-db/sdk/typescript/src/apis/RpcMeApi.ts | 102 ++++ .../src/apis/ServiceEndpointsApi.ts | 337 ++++++++++++ .../src/apis/ServiceFallbacksApi.ts | 337 ++++++++++++ .../sdk/typescript/src/apis/ServicesApi.ts | 487 ++++++++++++++++++ portal-db/sdk/typescript/src/apis/index.ts | 15 + portal-db/sdk/typescript/src/index.ts | 5 + .../sdk/typescript/src/models/Applications.ts | 139 +++++ .../sdk/typescript/src/models/Gateways.ts | 121 +++++ .../sdk/typescript/src/models/Networks.ts | 67 +++ .../typescript/src/models/Organizations.ts | 100 ++++ .../typescript/src/models/PortalAccounts.ts | 196 +++++++ .../src/models/PortalApplications.ts | 185 +++++++ .../sdk/typescript/src/models/PortalPlans.ts | 119 +++++ .../RpcCreatePortalApplicationPostRequest.ts | 142 +++++ .../typescript/src/models/ServiceEndpoints.ts | 116 +++++ .../typescript/src/models/ServiceFallbacks.ts | 102 ++++ .../sdk/typescript/src/models/Services.ts | 182 +++++++ portal-db/sdk/typescript/src/models/index.ts | 13 + portal-db/sdk/typescript/src/runtime.ts | 432 ++++++++++++++++ portal-db/sdk/typescript/tsconfig.json | 20 + 29 files changed, 6141 insertions(+) create mode 100644 portal-db/sdk/typescript/src/apis/ApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/GatewaysApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcMeApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/index.ts create mode 100644 portal-db/sdk/typescript/src/index.ts create mode 100644 portal-db/sdk/typescript/src/models/Applications.ts create mode 100644 portal-db/sdk/typescript/src/models/Gateways.ts create mode 100644 portal-db/sdk/typescript/src/models/Networks.ts create mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts create mode 100644 portal-db/sdk/typescript/src/models/Services.ts create mode 100644 portal-db/sdk/typescript/src/models/index.ts create mode 100644 portal-db/sdk/typescript/src/runtime.ts create mode 100644 portal-db/sdk/typescript/tsconfig.json diff --git a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts new file mode 100644 index 000000000..a7a0827f0 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts @@ -0,0 +1,397 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Applications, +} from '../models/index'; +import { + ApplicationsFromJSON, + ApplicationsToJSON, +} from '../models/index'; + +export interface ApplicationsDeleteRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ApplicationsDeletePreferEnum; +} + +export interface ApplicationsGetRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ApplicationsGetPreferEnum; +} + +export interface ApplicationsPatchRequest { + applicationAddress?: string; + gatewayAddress?: string; + serviceId?: string; + stakeAmount?: string; + stakeDenom?: string; + applicationPrivateKeyHex?: string; + networkId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ApplicationsPatchPreferEnum; + applications?: Applications; +} + +export interface ApplicationsPostRequest { + select?: string; + prefer?: ApplicationsPostPreferEnum; + applications?: Applications; +} + +/** + * + */ +export class ApplicationsApi extends runtime.BaseAPI { + + /** + * Onchain applications for processing relays through the network + */ + async applicationsDeleteRaw(requestParameters: ApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsDelete(requestParameters: ApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsGetRaw(requestParameters: ApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationsFromJSON)); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsGet(requestParameters: ApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.applicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPatchRaw(requestParameters: ApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['applicationAddress'] != null) { + queryParameters['application_address'] = requestParameters['applicationAddress']; + } + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['applicationPrivateKeyHex'] != null) { + queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ApplicationsToJSON(requestParameters['applications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPatch(requestParameters: ApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPostRaw(requestParameters: ApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplicationsToJSON(requestParameters['applications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain applications for processing relays through the network + */ + async applicationsPost(requestParameters: ApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.applicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ApplicationsDeletePreferEnum = typeof ApplicationsDeletePreferEnum[keyof typeof ApplicationsDeletePreferEnum]; +/** + * @export + */ +export const ApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ApplicationsGetPreferEnum = typeof ApplicationsGetPreferEnum[keyof typeof ApplicationsGetPreferEnum]; +/** + * @export + */ +export const ApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ApplicationsPatchPreferEnum = typeof ApplicationsPatchPreferEnum[keyof typeof ApplicationsPatchPreferEnum]; +/** + * @export + */ +export const ApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ApplicationsPostPreferEnum = typeof ApplicationsPostPreferEnum[keyof typeof ApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts new file mode 100644 index 000000000..bbfc5f024 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts @@ -0,0 +1,367 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Gateways, +} from '../models/index'; +import { + GatewaysFromJSON, + GatewaysToJSON, +} from '../models/index'; + +export interface GatewaysDeleteRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + prefer?: GatewaysDeletePreferEnum; +} + +export interface GatewaysGetRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: GatewaysGetPreferEnum; +} + +export interface GatewaysPatchRequest { + gatewayAddress?: string; + stakeAmount?: string; + stakeDenom?: string; + networkId?: string; + gatewayPrivateKeyHex?: string; + createdAt?: string; + updatedAt?: string; + prefer?: GatewaysPatchPreferEnum; + gateways?: Gateways; +} + +export interface GatewaysPostRequest { + select?: string; + prefer?: GatewaysPostPreferEnum; + gateways?: Gateways; +} + +/** + * + */ +export class GatewaysApi extends runtime.BaseAPI { + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysDeleteRaw(requestParameters: GatewaysDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysDelete(requestParameters: GatewaysDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysDeleteRaw(requestParameters, initOverrides); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysGetRaw(requestParameters: GatewaysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GatewaysFromJSON)); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysGet(requestParameters: GatewaysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.gatewaysGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPatchRaw(requestParameters: GatewaysPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['gatewayAddress'] != null) { + queryParameters['gateway_address'] = requestParameters['gatewayAddress']; + } + + if (requestParameters['stakeAmount'] != null) { + queryParameters['stake_amount'] = requestParameters['stakeAmount']; + } + + if (requestParameters['stakeDenom'] != null) { + queryParameters['stake_denom'] = requestParameters['stakeDenom']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['gatewayPrivateKeyHex'] != null) { + queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: GatewaysToJSON(requestParameters['gateways']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPatch(requestParameters: GatewaysPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysPatchRaw(requestParameters, initOverrides); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPostRaw(requestParameters: GatewaysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/gateways`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GatewaysToJSON(requestParameters['gateways']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Onchain gateway information including stake and network details + */ + async gatewaysPost(requestParameters: GatewaysPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewaysPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const GatewaysDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type GatewaysDeletePreferEnum = typeof GatewaysDeletePreferEnum[keyof typeof GatewaysDeletePreferEnum]; +/** + * @export + */ +export const GatewaysGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type GatewaysGetPreferEnum = typeof GatewaysGetPreferEnum[keyof typeof GatewaysGetPreferEnum]; +/** + * @export + */ +export const GatewaysPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type GatewaysPatchPreferEnum = typeof GatewaysPatchPreferEnum[keyof typeof GatewaysPatchPreferEnum]; +/** + * @export + */ +export const GatewaysPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type GatewaysPostPreferEnum = typeof GatewaysPostPreferEnum[keyof typeof GatewaysPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts new file mode 100644 index 000000000..b654b5e25 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +/** + * + */ +export class IntrospectionApi extends runtime.BaseAPI { + + /** + * OpenAPI description (this document) + */ + async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * OpenAPI description (this document) + */ + async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rootGetRaw(initOverrides); + } + +} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts new file mode 100644 index 000000000..7ed2eea64 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/NetworksApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Networks, +} from '../models/index'; +import { + NetworksFromJSON, + NetworksToJSON, +} from '../models/index'; + +export interface NetworksDeleteRequest { + networkId?: string; + prefer?: NetworksDeletePreferEnum; +} + +export interface NetworksGetRequest { + networkId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: NetworksGetPreferEnum; +} + +export interface NetworksPatchRequest { + networkId?: string; + prefer?: NetworksPatchPreferEnum; + networks?: Networks; +} + +export interface NetworksPostRequest { + select?: string; + prefer?: NetworksPostPreferEnum; + networks?: Networks; +} + +/** + * + */ +export class NetworksApi extends runtime.BaseAPI { + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.networksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const NetworksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; +/** + * @export + */ +export const NetworksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; +/** + * @export + */ +export const NetworksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; +/** + * @export + */ +export const NetworksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts new file mode 100644 index 000000000..9944fa2cd --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Organizations, +} from '../models/index'; +import { + OrganizationsFromJSON, + OrganizationsToJSON, +} from '../models/index'; + +export interface OrganizationsDeleteRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsDeletePreferEnum; +} + +export interface OrganizationsGetRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: OrganizationsGetPreferEnum; +} + +export interface OrganizationsPatchRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsPatchPreferEnum; + organizations?: Organizations; +} + +export interface OrganizationsPostRequest { + select?: string; + prefer?: OrganizationsPostPreferEnum; + organizations?: Organizations; +} + +/** + * + */ +export class OrganizationsApi extends runtime.BaseAPI { + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.organizationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const OrganizationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; +/** + * @export + */ +export const OrganizationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; +/** + * @export + */ +export const OrganizationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; +/** + * @export + */ +export const OrganizationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts new file mode 100644 index 000000000..f7db3d925 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccounts, +} from '../models/index'; +import { + PortalAccountsFromJSON, + PortalAccountsToJSON, +} from '../models/index'; + +export interface PortalAccountsDeleteRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsDeletePreferEnum; +} + +export interface PortalAccountsGetRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountsGetPreferEnum; +} + +export interface PortalAccountsPatchRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsPatchPreferEnum; + portalAccounts?: PortalAccounts; +} + +export interface PortalAccountsPostRequest { + select?: string; + prefer?: PortalAccountsPostPreferEnum; + portalAccounts?: PortalAccounts; +} + +/** + * + */ +export class PortalAccountsApi extends runtime.BaseAPI { + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPatchRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; +/** + * @export + */ +export const PortalAccountsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts new file mode 100644 index 000000000..4161669cc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts @@ -0,0 +1,472 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplications, +} from '../models/index'; +import { + PortalApplicationsFromJSON, + PortalApplicationsToJSON, +} from '../models/index'; + +export interface PortalApplicationsDeleteRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsDeletePreferEnum; +} + +export interface PortalApplicationsGetRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationsGetPreferEnum; +} + +export interface PortalApplicationsPatchRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsPatchPreferEnum; + portalApplications?: PortalApplications; +} + +export interface PortalApplicationsPostRequest { + select?: string; + prefer?: PortalApplicationsPostPreferEnum; + portalApplications?: PortalApplications; +} + +/** + * + */ +export class PortalApplicationsApi extends runtime.BaseAPI { + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts new file mode 100644 index 000000000..6400389ad --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts @@ -0,0 +1,352 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalPlans, +} from '../models/index'; +import { + PortalPlansFromJSON, + PortalPlansToJSON, +} from '../models/index'; + +export interface PortalPlansDeleteRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansDeletePreferEnum; +} + +export interface PortalPlansGetRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalPlansGetPreferEnum; +} + +export interface PortalPlansPatchRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansPatchPreferEnum; + portalPlans?: PortalPlans; +} + +export interface PortalPlansPostRequest { + select?: string; + prefer?: PortalPlansPostPreferEnum; + portalPlans?: PortalPlans; +} + +/** + * + */ +export class PortalPlansApi extends runtime.BaseAPI { + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalPlansGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPatchRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalPlansDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; +/** + * @export + */ +export const PortalPlansGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; +/** + * @export + */ +export const PortalPlansPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; +/** + * @export + */ +export const PortalPlansPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts new file mode 100644 index 000000000..b4f1682ae --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts @@ -0,0 +1,184 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcCreatePortalApplicationPostRequest, +} from '../models/index'; +import { + RpcCreatePortalApplicationPostRequestFromJSON, + RpcCreatePortalApplicationPostRequestToJSON, +} from '../models/index'; + +export interface RpcCreatePortalApplicationGetRequest { + pPortalAccountId: string; + pPortalUserId: string; + pPortalApplicationName?: string; + pEmoji?: string; + pPortalApplicationUserLimit?: number; + pPortalApplicationUserLimitInterval?: string; + pPortalApplicationUserLimitRps?: number; + pPortalApplicationDescription?: string; + pFavoriteServiceIds?: string; + pSecretKeyRequired?: string; +} + +export interface RpcCreatePortalApplicationPostOperationRequest { + rpcCreatePortalApplicationPostRequest: RpcCreatePortalApplicationPostRequest; + prefer?: RpcCreatePortalApplicationPostOperationPreferEnum; +} + +/** + * + */ +export class RpcCreatePortalApplicationApi extends runtime.BaseAPI { + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationGetRaw(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['pPortalAccountId'] == null) { + throw new runtime.RequiredError( + 'pPortalAccountId', + 'Required parameter "pPortalAccountId" was null or undefined when calling rpcCreatePortalApplicationGet().' + ); + } + + if (requestParameters['pPortalUserId'] == null) { + throw new runtime.RequiredError( + 'pPortalUserId', + 'Required parameter "pPortalUserId" was null or undefined when calling rpcCreatePortalApplicationGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['pPortalAccountId'] != null) { + queryParameters['p_portal_account_id'] = requestParameters['pPortalAccountId']; + } + + if (requestParameters['pPortalUserId'] != null) { + queryParameters['p_portal_user_id'] = requestParameters['pPortalUserId']; + } + + if (requestParameters['pPortalApplicationName'] != null) { + queryParameters['p_portal_application_name'] = requestParameters['pPortalApplicationName']; + } + + if (requestParameters['pEmoji'] != null) { + queryParameters['p_emoji'] = requestParameters['pEmoji']; + } + + if (requestParameters['pPortalApplicationUserLimit'] != null) { + queryParameters['p_portal_application_user_limit'] = requestParameters['pPortalApplicationUserLimit']; + } + + if (requestParameters['pPortalApplicationUserLimitInterval'] != null) { + queryParameters['p_portal_application_user_limit_interval'] = requestParameters['pPortalApplicationUserLimitInterval']; + } + + if (requestParameters['pPortalApplicationUserLimitRps'] != null) { + queryParameters['p_portal_application_user_limit_rps'] = requestParameters['pPortalApplicationUserLimitRps']; + } + + if (requestParameters['pPortalApplicationDescription'] != null) { + queryParameters['p_portal_application_description'] = requestParameters['pPortalApplicationDescription']; + } + + if (requestParameters['pFavoriteServiceIds'] != null) { + queryParameters['p_favorite_service_ids'] = requestParameters['pFavoriteServiceIds']; + } + + if (requestParameters['pSecretKeyRequired'] != null) { + queryParameters['p_secret_key_required'] = requestParameters['pSecretKeyRequired']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/create_portal_application`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationGet(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcCreatePortalApplicationGetRaw(requestParameters, initOverrides); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationPostRaw(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcCreatePortalApplicationPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcCreatePortalApplicationPostRequest', + 'Required parameter "rpcCreatePortalApplicationPostRequest" was null or undefined when calling rpcCreatePortalApplicationPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/create_portal_application`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcCreatePortalApplicationPostRequestToJSON(requestParameters['rpcCreatePortalApplicationPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + */ + async rpcCreatePortalApplicationPost(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcCreatePortalApplicationPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcCreatePortalApplicationPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcCreatePortalApplicationPostOperationPreferEnum = typeof RpcCreatePortalApplicationPostOperationPreferEnum[keyof typeof RpcCreatePortalApplicationPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts b/portal-db/sdk/typescript/src/apis/RpcMeApi.ts new file mode 100644 index 000000000..a8fdafb41 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcMeApi.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +export interface RpcMePostRequest { + body: object; + prefer?: RpcMePostPreferEnum; +} + +/** + * + */ +export class RpcMeApi extends runtime.BaseAPI { + + /** + */ + async rpcMeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/me`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcMeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcMeGetRaw(initOverrides); + } + + /** + */ + async rpcMePostRaw(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling rpcMePost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/me`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcMePost(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcMePostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcMePostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcMePostPreferEnum = typeof RpcMePostPreferEnum[keyof typeof RpcMePostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts new file mode 100644 index 000000000..9e4f193fc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceEndpoints, +} from '../models/index'; +import { + ServiceEndpointsFromJSON, + ServiceEndpointsToJSON, +} from '../models/index'; + +export interface ServiceEndpointsDeleteRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsDeletePreferEnum; +} + +export interface ServiceEndpointsGetRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceEndpointsGetPreferEnum; +} + +export interface ServiceEndpointsPatchRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsPatchPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +export interface ServiceEndpointsPostRequest { + select?: string; + prefer?: ServiceEndpointsPostPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +/** + * + */ +export class ServiceEndpointsApi extends runtime.BaseAPI { + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceEndpointsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; +/** + * @export + */ +export const ServiceEndpointsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts new file mode 100644 index 000000000..1a5f43ac7 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceFallbacks, +} from '../models/index'; +import { + ServiceFallbacksFromJSON, + ServiceFallbacksToJSON, +} from '../models/index'; + +export interface ServiceFallbacksDeleteRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksDeletePreferEnum; +} + +export interface ServiceFallbacksGetRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceFallbacksGetPreferEnum; +} + +export interface ServiceFallbacksPatchRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksPatchPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +export interface ServiceFallbacksPostRequest { + select?: string; + prefer?: ServiceFallbacksPostPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +/** + * + */ +export class ServiceFallbacksApi extends runtime.BaseAPI { + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceFallbacksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; +/** + * @export + */ +export const ServiceFallbacksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts new file mode 100644 index 000000000..953eda314 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServicesApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Services, +} from '../models/index'; +import { + ServicesFromJSON, + ServicesToJSON, +} from '../models/index'; + +export interface ServicesDeleteRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesDeletePreferEnum; +} + +export interface ServicesGetRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServicesGetPreferEnum; +} + +export interface ServicesPatchRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesPatchPreferEnum; + services?: Services; +} + +export interface ServicesPostRequest { + select?: string; + prefer?: ServicesPostPreferEnum; + services?: Services; +} + +/** + * + */ +export class ServicesApi extends runtime.BaseAPI { + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.servicesGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServicesDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; +/** + * @export + */ +export const ServicesGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; +/** + * @export + */ +export const ServicesPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; +/** + * @export + */ +export const ServicesPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts new file mode 100644 index 000000000..3e7698705 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './ApplicationsApi'; +export * from './GatewaysApi'; +export * from './IntrospectionApi'; +export * from './NetworksApi'; +export * from './OrganizationsApi'; +export * from './PortalAccountsApi'; +export * from './PortalApplicationsApi'; +export * from './PortalPlansApi'; +export * from './RpcCreatePortalApplicationApi'; +export * from './RpcMeApi'; +export * from './ServiceEndpointsApi'; +export * from './ServiceFallbacksApi'; +export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts new file mode 100644 index 000000000..bebe8bbbe --- /dev/null +++ b/portal-db/sdk/typescript/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Applications.ts b/portal-db/sdk/typescript/src/models/Applications.ts new file mode 100644 index 000000000..036376484 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Applications.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Onchain applications for processing relays through the network + * @export + * @interface Applications + */ +export interface Applications { + /** + * Blockchain address of the application + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Applications + */ + applicationAddress: string; + /** + * Note: + * This is a Foreign Key to `gateways.gateway_address`. + * @type {string} + * @memberof Applications + */ + gatewayAddress: string; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof Applications + */ + serviceId: string; + /** + * + * @type {number} + * @memberof Applications + */ + stakeAmount?: number; + /** + * + * @type {string} + * @memberof Applications + */ + stakeDenom?: string; + /** + * + * @type {string} + * @memberof Applications + */ + applicationPrivateKeyHex?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Applications + */ + networkId: string; + /** + * + * @type {string} + * @memberof Applications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Applications + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Applications interface. + */ +export function instanceOfApplications(value: object): value is Applications { + if (!('applicationAddress' in value) || value['applicationAddress'] === undefined) return false; + if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function ApplicationsFromJSON(json: any): Applications { + return ApplicationsFromJSONTyped(json, false); +} + +export function ApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Applications { + if (json == null) { + return json; + } + return { + + 'applicationAddress': json['application_address'], + 'gatewayAddress': json['gateway_address'], + 'serviceId': json['service_id'], + 'stakeAmount': json['stake_amount'] == null ? undefined : json['stake_amount'], + 'stakeDenom': json['stake_denom'] == null ? undefined : json['stake_denom'], + 'applicationPrivateKeyHex': json['application_private_key_hex'] == null ? undefined : json['application_private_key_hex'], + 'networkId': json['network_id'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ApplicationsToJSON(json: any): Applications { + return ApplicationsToJSONTyped(json, false); +} + +export function ApplicationsToJSONTyped(value?: Applications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'application_address': value['applicationAddress'], + 'gateway_address': value['gatewayAddress'], + 'service_id': value['serviceId'], + 'stake_amount': value['stakeAmount'], + 'stake_denom': value['stakeDenom'], + 'application_private_key_hex': value['applicationPrivateKeyHex'], + 'network_id': value['networkId'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Gateways.ts b/portal-db/sdk/typescript/src/models/Gateways.ts new file mode 100644 index 000000000..7c713aed1 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Gateways.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Onchain gateway information including stake and network details + * @export + * @interface Gateways + */ +export interface Gateways { + /** + * Blockchain address of the gateway + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Gateways + */ + gatewayAddress: string; + /** + * Amount of tokens staked by the gateway + * @type {number} + * @memberof Gateways + */ + stakeAmount: number; + /** + * + * @type {string} + * @memberof Gateways + */ + stakeDenom: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Gateways + */ + networkId: string; + /** + * + * @type {string} + * @memberof Gateways + */ + gatewayPrivateKeyHex?: string; + /** + * + * @type {string} + * @memberof Gateways + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Gateways + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Gateways interface. + */ +export function instanceOfGateways(value: object): value is Gateways { + if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; + if (!('stakeAmount' in value) || value['stakeAmount'] === undefined) return false; + if (!('stakeDenom' in value) || value['stakeDenom'] === undefined) return false; + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function GatewaysFromJSON(json: any): Gateways { + return GatewaysFromJSONTyped(json, false); +} + +export function GatewaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gateways { + if (json == null) { + return json; + } + return { + + 'gatewayAddress': json['gateway_address'], + 'stakeAmount': json['stake_amount'], + 'stakeDenom': json['stake_denom'], + 'networkId': json['network_id'], + 'gatewayPrivateKeyHex': json['gateway_private_key_hex'] == null ? undefined : json['gateway_private_key_hex'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function GatewaysToJSON(json: any): Gateways { + return GatewaysToJSONTyped(json, false); +} + +export function GatewaysToJSONTyped(value?: Gateways | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'gateway_address': value['gatewayAddress'], + 'stake_amount': value['stakeAmount'], + 'stake_denom': value['stakeDenom'], + 'network_id': value['networkId'], + 'gateway_private_key_hex': value['gatewayPrivateKeyHex'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts new file mode 100644 index 000000000..8ff34b54a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Networks.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + * @export + * @interface Networks + */ +export interface Networks { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Networks + */ + networkId: string; +} + +/** + * Check if a given object implements the Networks interface. + */ +export function instanceOfNetworks(value: object): value is Networks { + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function NetworksFromJSON(json: any): Networks { + return NetworksFromJSONTyped(json, false); +} + +export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { + if (json == null) { + return json; + } + return { + + 'networkId': json['network_id'], + }; +} + +export function NetworksToJSON(json: any): Networks { + return NetworksToJSONTyped(json, false); +} + +export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'network_id': value['networkId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts new file mode 100644 index 000000000..3c35c6a79 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Organizations.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Companies or customer groups that can be attached to Portal Accounts + * @export + * @interface Organizations + */ +export interface Organizations { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof Organizations + */ + organizationId: number; + /** + * Name of the organization + * @type {string} + * @memberof Organizations + */ + organizationName: string; + /** + * Soft delete timestamp + * @type {string} + * @memberof Organizations + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Organizations interface. + */ +export function instanceOfOrganizations(value: object): value is Organizations { + if (!('organizationId' in value) || value['organizationId'] === undefined) return false; + if (!('organizationName' in value) || value['organizationName'] === undefined) return false; + return true; +} + +export function OrganizationsFromJSON(json: any): Organizations { + return OrganizationsFromJSONTyped(json, false); +} + +export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { + if (json == null) { + return json; + } + return { + + 'organizationId': json['organization_id'], + 'organizationName': json['organization_name'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function OrganizationsToJSON(json: any): Organizations { + return OrganizationsToJSONTyped(json, false); +} + +export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'organization_id': value['organizationId'], + 'organization_name': value['organizationName'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts new file mode 100644 index 000000000..ee2b80517 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccounts.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Multi-tenant accounts with plans and billing integration + * @export + * @interface PortalAccounts + */ +export interface PortalAccounts { + /** + * Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalAccounts + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `organizations.organization_id`. + * @type {number} + * @memberof PortalAccounts + */ + organizationId?: number; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalAccounts + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + userAccountName?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + internalAccountName?: string; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + billingType?: string; + /** + * Stripe subscription identifier for billing + * @type {string} + * @memberof PortalAccounts + */ + stripeSubscriptionId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpAccountId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalAccountsPortalAccountUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalAccounts interface. + */ +export function instanceOfPortalAccounts(value: object): value is PortalAccounts { + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalAccountsFromJSON(json: any): PortalAccounts { + return PortalAccountsFromJSONTyped(json, false); +} + +export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'], + 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], + 'portalPlanType': json['portal_plan_type'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], + 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], + 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalAccountsToJSON(json: any): PortalAccounts { + return PortalAccountsToJSONTyped(json, false); +} + +export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'organization_id': value['organizationId'], + 'portal_plan_type': value['portalPlanType'], + 'user_account_name': value['userAccountName'], + 'internal_account_name': value['internalAccountName'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], + 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], + 'billing_type': value['billingType'], + 'stripe_subscription_id': value['stripeSubscriptionId'], + 'gcp_account_id': value['gcpAccountId'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts new file mode 100644 index 000000000..08c5953bc --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplications.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Applications created within portal accounts with their own rate limits and settings + * @export + * @interface PortalApplications + */ +export interface PortalApplications { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalApplications + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalApplications + */ + portalAccountId: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationName?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + emoji?: string; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationDescription?: string; + /** + * + * @type {Array} + * @memberof PortalApplications + */ + favoriteServiceIds?: Array; + /** + * Hashed secret key for application authentication + * @type {string} + * @memberof PortalApplications + */ + secretKeyHash?: string; + /** + * + * @type {boolean} + * @memberof PortalApplications + */ + secretKeyRequired?: boolean; + /** + * + * @type {string} + * @memberof PortalApplications + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalApplications interface. + */ +export function instanceOfPortalApplications(value: object): value is PortalApplications { + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + return true; +} + +export function PortalApplicationsFromJSON(json: any): PortalApplications { + return PortalApplicationsFromJSONTyped(json, false); +} + +export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { + if (json == null) { + return json; + } + return { + + 'portalApplicationId': json['portal_application_id'], + 'portalAccountId': json['portal_account_id'], + 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], + 'emoji': json['emoji'] == null ? undefined : json['emoji'], + 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], + 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], + 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], + 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], + 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], + 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], + 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationsToJSON(json: any): PortalApplications { + return PortalApplicationsToJSONTyped(json, false); +} + +export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_application_id': value['portalApplicationId'], + 'portal_account_id': value['portalAccountId'], + 'portal_application_name': value['portalApplicationName'], + 'emoji': value['emoji'], + 'portal_application_user_limit': value['portalApplicationUserLimit'], + 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], + 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], + 'portal_application_description': value['portalApplicationDescription'], + 'favorite_service_ids': value['favoriteServiceIds'], + 'secret_key_hash': value['secretKeyHash'], + 'secret_key_required': value['secretKeyRequired'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts new file mode 100644 index 000000000..d89b2b209 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalPlans.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available subscription plans for Portal Accounts + * @export + * @interface PortalPlans + */ +export interface PortalPlans { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalPlans + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalPlans + */ + portalPlanTypeDescription?: string; + /** + * Maximum usage allowed within the interval + * @type {number} + * @memberof PortalPlans + */ + planUsageLimit?: number; + /** + * + * @type {string} + * @memberof PortalPlans + */ + planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; + /** + * Rate limit in requests per second + * @type {number} + * @memberof PortalPlans + */ + planRateLimitRps?: number; + /** + * + * @type {number} + * @memberof PortalPlans + */ + planApplicationLimit?: number; +} + + +/** + * @export + */ +export const PortalPlansPlanUsageLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalPlans interface. + */ +export function instanceOfPortalPlans(value: object): value is PortalPlans { + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalPlansFromJSON(json: any): PortalPlans { + return PortalPlansFromJSONTyped(json, false); +} + +export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { + if (json == null) { + return json; + } + return { + + 'portalPlanType': json['portal_plan_type'], + 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], + 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], + 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], + 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], + 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], + }; +} + +export function PortalPlansToJSON(json: any): PortalPlans { + return PortalPlansToJSONTyped(json, false); +} + +export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_plan_type': value['portalPlanType'], + 'portal_plan_type_description': value['portalPlanTypeDescription'], + 'plan_usage_limit': value['planUsageLimit'], + 'plan_usage_limit_interval': value['planUsageLimitInterval'], + 'plan_rate_limit_rps': value['planRateLimitRps'], + 'plan_application_limit': value['planApplicationLimit'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts new file mode 100644 index 000000000..df5aa2c30 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Creates a portal application with all associated RBAC entries in a single atomic transaction. + * Validates user membership in the account before creation. + * Returns the application details including the generated secret key. + * This function is exposed via PostgREST as POST /rpc/create_portal_application + * @export + * @interface RpcCreatePortalApplicationPostRequest + */ +export interface RpcCreatePortalApplicationPostRequest { + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pEmoji?: string; + /** + * + * @type {Array} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pFavoriteServiceIds?: Array; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalAccountId: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationDescription?: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationName?: string; + /** + * + * @type {number} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimitInterval?: string; + /** + * + * @type {number} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pPortalUserId: string; + /** + * + * @type {string} + * @memberof RpcCreatePortalApplicationPostRequest + */ + pSecretKeyRequired?: string; +} + +/** + * Check if a given object implements the RpcCreatePortalApplicationPostRequest interface. + */ +export function instanceOfRpcCreatePortalApplicationPostRequest(value: object): value is RpcCreatePortalApplicationPostRequest { + if (!('pPortalAccountId' in value) || value['pPortalAccountId'] === undefined) return false; + if (!('pPortalUserId' in value) || value['pPortalUserId'] === undefined) return false; + return true; +} + +export function RpcCreatePortalApplicationPostRequestFromJSON(json: any): RpcCreatePortalApplicationPostRequest { + return RpcCreatePortalApplicationPostRequestFromJSONTyped(json, false); +} + +export function RpcCreatePortalApplicationPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcCreatePortalApplicationPostRequest { + if (json == null) { + return json; + } + return { + + 'pEmoji': json['p_emoji'] == null ? undefined : json['p_emoji'], + 'pFavoriteServiceIds': json['p_favorite_service_ids'] == null ? undefined : json['p_favorite_service_ids'], + 'pPortalAccountId': json['p_portal_account_id'], + 'pPortalApplicationDescription': json['p_portal_application_description'] == null ? undefined : json['p_portal_application_description'], + 'pPortalApplicationName': json['p_portal_application_name'] == null ? undefined : json['p_portal_application_name'], + 'pPortalApplicationUserLimit': json['p_portal_application_user_limit'] == null ? undefined : json['p_portal_application_user_limit'], + 'pPortalApplicationUserLimitInterval': json['p_portal_application_user_limit_interval'] == null ? undefined : json['p_portal_application_user_limit_interval'], + 'pPortalApplicationUserLimitRps': json['p_portal_application_user_limit_rps'] == null ? undefined : json['p_portal_application_user_limit_rps'], + 'pPortalUserId': json['p_portal_user_id'], + 'pSecretKeyRequired': json['p_secret_key_required'] == null ? undefined : json['p_secret_key_required'], + }; +} + +export function RpcCreatePortalApplicationPostRequestToJSON(json: any): RpcCreatePortalApplicationPostRequest { + return RpcCreatePortalApplicationPostRequestToJSONTyped(json, false); +} + +export function RpcCreatePortalApplicationPostRequestToJSONTyped(value?: RpcCreatePortalApplicationPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'p_emoji': value['pEmoji'], + 'p_favorite_service_ids': value['pFavoriteServiceIds'], + 'p_portal_account_id': value['pPortalAccountId'], + 'p_portal_application_description': value['pPortalApplicationDescription'], + 'p_portal_application_name': value['pPortalApplicationName'], + 'p_portal_application_user_limit': value['pPortalApplicationUserLimit'], + 'p_portal_application_user_limit_interval': value['pPortalApplicationUserLimitInterval'], + 'p_portal_application_user_limit_rps': value['pPortalApplicationUserLimitRps'], + 'p_portal_user_id': value['pPortalUserId'], + 'p_secret_key_required': value['pSecretKeyRequired'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts new file mode 100644 index 000000000..516acad4a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available endpoint types for each service + * @export + * @interface ServiceEndpoints + */ +export interface ServiceEndpoints { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceEndpoints + */ + endpointId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceEndpoints + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + endpointType?: ServiceEndpointsEndpointTypeEnum; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const ServiceEndpointsEndpointTypeEnum = { + CometBft: 'cometBFT', + Cosmos: 'cosmos', + Rest: 'REST', + JsonRpc: 'JSON-RPC', + Wss: 'WSS', + GRpc: 'gRPC' +} as const; +export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; + + +/** + * Check if a given object implements the ServiceEndpoints interface. + */ +export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { + if (!('endpointId' in value) || value['endpointId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + return true; +} + +export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { + return ServiceEndpointsFromJSONTyped(json, false); +} + +export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { + if (json == null) { + return json; + } + return { + + 'endpointId': json['endpoint_id'], + 'serviceId': json['service_id'], + 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { + return ServiceEndpointsToJSONTyped(json, false); +} + +export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'endpoint_id': value['endpointId'], + 'service_id': value['serviceId'], + 'endpoint_type': value['endpointType'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts new file mode 100644 index 000000000..a10559ad2 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Fallback URLs for services when primary endpoints fail + * @export + * @interface ServiceFallbacks + */ +export interface ServiceFallbacks { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceFallbacks + */ + serviceFallbackId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceFallbacks + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + fallbackUrl: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the ServiceFallbacks interface. + */ +export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { + if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; + return true; +} + +export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { + return ServiceFallbacksFromJSONTyped(json, false); +} + +export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { + if (json == null) { + return json; + } + return { + + 'serviceFallbackId': json['service_fallback_id'], + 'serviceId': json['service_id'], + 'fallbackUrl': json['fallback_url'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { + return ServiceFallbacksToJSONTyped(json, false); +} + +export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_fallback_id': value['serviceFallbackId'], + 'service_id': value['serviceId'], + 'fallback_url': value['fallbackUrl'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts new file mode 100644 index 000000000..c9341fcdb --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Services.ts @@ -0,0 +1,182 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain services from the Pocket Network + * @export + * @interface Services + */ +export interface Services { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Services + */ + serviceId: string; + /** + * + * @type {string} + * @memberof Services + */ + serviceName: string; + /** + * Cost in compute units for each relay + * @type {number} + * @memberof Services + */ + computeUnitsPerRelay?: number; + /** + * Valid domains for this service + * @type {Array} + * @memberof Services + */ + serviceDomains: Array; + /** + * + * @type {string} + * @memberof Services + */ + serviceOwnerAddress?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Services + */ + networkId?: string; + /** + * + * @type {boolean} + * @memberof Services + */ + active?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + beta?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + comingSoon?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + qualityFallbackEnabled?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + hardFallbackEnabled?: boolean; + /** + * + * @type {string} + * @memberof Services + */ + svgIcon?: string; + /** + * + * @type {string} + * @memberof Services + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Services interface. + */ +export function instanceOfServices(value: object): value is Services { + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('serviceName' in value) || value['serviceName'] === undefined) return false; + if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; + return true; +} + +export function ServicesFromJSON(json: any): Services { + return ServicesFromJSONTyped(json, false); +} + +export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { + if (json == null) { + return json; + } + return { + + 'serviceId': json['service_id'], + 'serviceName': json['service_name'], + 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], + 'serviceDomains': json['service_domains'], + 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], + 'networkId': json['network_id'] == null ? undefined : json['network_id'], + 'active': json['active'] == null ? undefined : json['active'], + 'beta': json['beta'] == null ? undefined : json['beta'], + 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], + 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], + 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], + 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServicesToJSON(json: any): Services { + return ServicesToJSONTyped(json, false); +} + +export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_id': value['serviceId'], + 'service_name': value['serviceName'], + 'compute_units_per_relay': value['computeUnitsPerRelay'], + 'service_domains': value['serviceDomains'], + 'service_owner_address': value['serviceOwnerAddress'], + 'network_id': value['networkId'], + 'active': value['active'], + 'beta': value['beta'], + 'coming_soon': value['comingSoon'], + 'quality_fallback_enabled': value['qualityFallbackEnabled'], + 'hard_fallback_enabled': value['hardFallbackEnabled'], + 'svg_icon': value['svgIcon'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts new file mode 100644 index 000000000..eda1454eb --- /dev/null +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './Applications'; +export * from './Gateways'; +export * from './Networks'; +export * from './Organizations'; +export * from './PortalAccounts'; +export * from './PortalApplications'; +export * from './PortalPlans'; +export * from './RpcCreatePortalApplicationPostRequest'; +export * from './ServiceEndpoints'; +export * from './ServiceFallbacks'; +export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts new file mode 100644 index 000000000..f4d9fba5c --- /dev/null +++ b/portal-db/sdk/typescript/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json new file mode 100644 index 000000000..4567ec198 --- /dev/null +++ b/portal-db/sdk/typescript/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} From e2e1615c7031d54b103037dfa0257870fd3501e2 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:49:42 -0700 Subject: [PATCH 27/43] Delete all sdk gen code --- README.md | 2 - portal-db/api/README.md | 82 - portal-db/api/codegen/codegen-client.yaml | 10 - portal-db/api/codegen/codegen-models.yaml | 9 - portal-db/api/codegen/generate-sdks.sh | 429 - portal-db/sdk/go/README.md | 201 - portal-db/sdk/go/client.go | 13038 ---------------- portal-db/sdk/go/go.mod | 25 - portal-db/sdk/go/go.sum | 54 - portal-db/sdk/go/models.go | 2033 --- portal-db/sdk/typescript/.gitignore | 4 - portal-db/sdk/typescript/.npmignore | 1 - .../sdk/typescript/.openapi-generator-ignore | 26 - .../sdk/typescript/.openapi-generator/FILES | 32 - .../sdk/typescript/.openapi-generator/VERSION | 1 - portal-db/sdk/typescript/README.md | 96 - portal-db/sdk/typescript/package.json | 19 - 17 files changed, 16062 deletions(-) delete mode 100644 portal-db/api/codegen/codegen-client.yaml delete mode 100644 portal-db/api/codegen/codegen-models.yaml delete mode 100755 portal-db/api/codegen/generate-sdks.sh delete mode 100644 portal-db/sdk/go/README.md delete mode 100644 portal-db/sdk/go/client.go delete mode 100644 portal-db/sdk/go/go.mod delete mode 100644 portal-db/sdk/go/go.sum delete mode 100644 portal-db/sdk/go/models.go delete mode 100644 portal-db/sdk/typescript/.gitignore delete mode 100644 portal-db/sdk/typescript/.npmignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES delete mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION delete mode 100644 portal-db/sdk/typescript/README.md delete mode 100644 portal-db/sdk/typescript/package.json diff --git a/README.md b/README.md index 7345b5e57..e13a23289 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,6 @@ See the following docs for more information: - [portal-db](./portal-db/README.md) - [portal-db/api](./portal-db/api/README.md) -- [portal-db/sdk/go](./portal-db/sdk/go/README.md) -- [portal-db/sdk/typescript](./portal-db/sdk/typescript/README.md) --- diff --git a/portal-db/api/README.md b/portal-db/api/README.md index d30d4d334..742358c10 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -38,24 +38,6 @@ curl http://localhost:3000/networks curl http://localhost:3000/ | jq ``` -### 4. Generate Go SDK - -**๐Ÿ’ก TODO_NEXT(@commoddity): Add Typescript SDK Generation to the Portal DB / PostgREST folder** - -```bash -# Generate OpenAPI spec and Go client -make generate-all -``` - -### 5. Use the Go SDK - -```go -import "github.com/grove/path/portal-db/sdk/go" - -client, _ := portaldb.NewClientWithResponses("http://localhost:3000") -networks, _ := client.GetNetworksWithResponse(context.Background(), nil) -``` - # Table of Contents - [Portal Database API](#portal-database-api) @@ -75,7 +57,6 @@ networks, _ := client.GetNetworksWithResponse(context.Background(), nil) - [๐Ÿ› ๏ธ Go SDK Generation](#๏ธ-go-sdk-generation) - [Generate SDK](#generate-sdk) - [Generated Files](#generated-files) - - [Use the Go SDK](#use-the-go-sdk) - [๐Ÿ”ง Development](#-development) - [Available Commands](#available-commands) - [After Database Schema Changes](#after-database-schema-changes) @@ -285,73 +266,10 @@ make generate-all # Or generate individually make generate-openapi # OpenAPI specification only -make generate-sdks # Go SDK only ``` ### Generated Files -``` -sdk/go/ -โ”œโ”€โ”€ models.go # Data types and structures (generated) -โ”œโ”€โ”€ client.go # API client and methods (generated) -โ”œโ”€โ”€ go.mod # Go module definition (permanent) -โ””โ”€โ”€ README.md # SDK documentation (permanent) -``` - -### Use the Go SDK - -**Basic Usage:** - -```go -package main - -import ( - "context" - portaldb "github.com/grove/path/portal-db/sdk/go" -) - -func main() { - // Create client - client, err := portaldb.NewClientWithResponses("http://localhost:3000") - if err != nil { - panic(err) - } - - // Get all networks - networks, err := client.GetNetworksWithResponse(context.Background(), nil) - if err != nil { - panic(err) - } - - // Print results - for _, network := range *networks.JSON200 { - fmt.Printf("Network: %s\n", network.NetworkId) - } -} -``` - -**With Authentication:** - -```go -// JWT token from gen-jwt.sh -token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - -// Request editor to add auth header -requestEditor := func(ctx context.Context, req *http.Request) error { - req.Header.Set("Authorization", "Bearer "+token) - return nil -} - -// Make authenticated request -accounts, err := client.GetPortalAccountsWithResponse( - context.Background(), - &portaldb.GetPortalAccountsParams{}, - requestEditor, -) -``` - -For complete Go SDK documentation, see [`sdk/go/README.md`](../sdk/go/README.md). - ## ๐Ÿ”ง Development ### Available Commands diff --git a/portal-db/api/codegen/codegen-client.yaml b/portal-db/api/codegen/codegen-client.yaml deleted file mode 100644 index 1935e80fa..000000000 --- a/portal-db/api/codegen/codegen-client.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json -package: portaldb -output: ../../sdk/go/client.go -generate: - client: true - models: false - embedded-spec: true -output-options: - skip-fmt: false - skip-prune: false diff --git a/portal-db/api/codegen/codegen-models.yaml b/portal-db/api/codegen/codegen-models.yaml deleted file mode 100644 index b540a8fb0..000000000 --- a/portal-db/api/codegen/codegen-models.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json -package: portaldb -output: ../../sdk/go/models.go -generate: - models: true - embedded-spec: false -output-options: - skip-fmt: false - skip-prune: false diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh deleted file mode 100755 index d5c6966df..000000000 --- a/portal-db/api/codegen/generate-sdks.sh +++ /dev/null @@ -1,429 +0,0 @@ -#!/bin/bash - -# Generate Go and TypeScript SDKs from OpenAPI specification -# This script generates both Go and TypeScript SDKs for the Portal DB API -# - Go SDK: Uses oapi-codegen for client and models generation -# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation - -set -e - -# Configuration -OPENAPI_DIR="../openapi" -OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" -OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" -GO_OUTPUT_DIR="../../sdk/go" -TS_OUTPUT_DIR="../../sdk/typescript" -CONFIG_MODELS="./codegen-models.yaml" -CONFIG_CLIENT="./codegen-client.yaml" -POSTGREST_URL="http://localhost:3000" - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." - -# ============================================================================ -# PHASE 1: ENVIRONMENT VALIDATION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 1: Environment Validation${NC}" - -# Check if Go is installed -if ! command -v go >/dev/null 2>&1; then - echo -e "${RED}โŒ Go is not installed. Please install Go first.${NC}" - echo " - Mac: brew install go" - echo " - Or download from: https://golang.org/" - exit 1 -fi - -echo -e "${GREEN}โœ… Go is installed: $(go version)${NC}" - -# Check if oapi-codegen is installed -if ! command -v oapi-codegen >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing oapi-codegen..." - go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest - - # Verify installation - if ! command -v oapi-codegen >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install oapi-codegen. Please check your Go installation.${NC}" - exit 1 - fi -fi - -echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" - -# Check if Node.js and npm are installed for TypeScript SDK generation -if ! command -v node >/dev/null 2>&1; then - echo -e "${RED}โŒ Node.js is not installed. Please install Node.js first.${NC}" - echo " - Mac: brew install node" - echo " - Or download from: https://nodejs.org/" - exit 1 -fi - -echo -e "${GREEN}โœ… Node.js is installed: $(node --version)${NC}" - -if ! command -v npm >/dev/null 2>&1; then - echo -e "${RED}โŒ npm is not installed. Please install npm first.${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" - -# Check if Java is installed -if ! command -v java >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" - echo " Install Java: brew install openjdk" - exit 1 -fi - -# Verify Java is working properly -if ! java -version >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" - echo " Fix Java installation: brew install openjdk" - echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" - exit 1 -fi - -JAVA_VERSION=$(java -version 2>&1 | head -n1) -echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" - -# Check if openapi-generator-cli is installed -if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing openapi-generator-cli..." - npm install -g @openapitools/openapi-generator-cli - - # Verify installation - if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" - exit 1 - fi -fi - -echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" - -# Check if PostgREST is running -echo "๐ŸŒ Checking PostgREST availability..." -if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then - echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" - echo " Please ensure PostgREST is running:" - echo " cd .. && docker compose up -d" - echo " cd api && docker compose up -d" - exit 1 -fi - -echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" - -# Check if configuration files exist -for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do - if [ ! -f "$config_file" ]; then - echo -e "${RED}โŒ Configuration file not found: $config_file${NC}" - echo " This should have been created as a permanent file." - exit 1 - fi -done - -echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" - -# ============================================================================ -# PHASE 2: SPEC RETRIEVAL & CONVERSION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" - -# Create openapi directory if it doesn't exist -mkdir -p "$OPENAPI_DIR" - -# Clean any existing files to start fresh -echo "๐Ÿงน Cleaning previous OpenAPI files..." -rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" - -# Generate JWT token for authenticated access to get all endpoints -echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." -JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) - -if [ -z "$JWT_TOKEN" ]; then - echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." - AUTH_HEADER="" -else - echo "โœ… JWT token generated, will fetch all endpoints (public + protected)" - AUTH_HEADER="Authorization: Bearer $JWT_TOKEN" -fi - -# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) -echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." -if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then - echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" - exit 1 -fi - -# Verify the file was created and has content -if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then - echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" - -# Convert Swagger 2.0 to OpenAPI 3.x -echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." - -# Check if swagger2openapi is available -if ! command -v swagger2openapi >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing swagger2openapi converter..." - if command -v npm >/dev/null 2>&1; then - npm install -g swagger2openapi - else - echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" - echo " - Mac: brew install node" - echo " - Or download from: https://nodejs.org/" - exit 1 - fi -fi - -if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" - exit 1 -fi - -# Fix boolean format issues in the converted spec (in place) -echo "๐Ÿ”ง Fixing boolean format issues..." -sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" -rm -f "${OPENAPI_V3_FILE}.bak" - -# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version -echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." -rm -f "$OPENAPI_V2_FILE" - -echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" - -# ============================================================================ -# PHASE 3: SDK GENERATION -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 3: SDK Generation${NC}" - -echo "๐Ÿน Generating Go SDK in separate files for better readability..." - -# Clean previous generated files -echo "๐Ÿงน Cleaning previous generated files..." -rm -f "$GO_OUTPUT_DIR/models.go" "$GO_OUTPUT_DIR/client.go" - -# Generate models file (data types and structures) -echo " Generating models.go..." -if ! oapi-codegen -config "$CONFIG_MODELS" "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to generate models${NC}" - exit 1 -fi - -# Generate client file (API client and methods) -echo " Generating client.go..." -if ! oapi-codegen -config "$CONFIG_CLIENT" "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to generate client${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" - -echo "" -echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." - -# Create TypeScript output directory if it doesn't exist -mkdir -p "$TS_OUTPUT_DIR" - -# Clean previous generated TypeScript files (keep permanent files) -echo "๐Ÿงน Cleaning previous TypeScript generated files..." -rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" - -# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) -echo " Generating TypeScript client with built-in methods..." -if ! openapi-generator-cli generate \ - -i "$OPENAPI_V3_FILE" \ - -g typescript-fetch \ - -o "$TS_OUTPUT_DIR" \ - --skip-validate-spec \ - --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then - echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" - exit 1 -fi - - -echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" - -# ============================================================================ -# PHASE 4: MODULE SETUP -# ============================================================================ - -echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 4: Module Setup${NC}" - -# Navigate to SDK directory for module setup -cd "$GO_OUTPUT_DIR" - -# Run go mod tidy to resolve dependencies -echo "๐Ÿ”ง Resolving dependencies..." -if ! go mod tidy; then - echo -e "${RED}โŒ Failed to resolve Go dependencies${NC}" - cd - >/dev/null - exit 1 -fi - -echo -e "${GREEN}โœ… Go dependencies resolved${NC}" - -# Test compilation -echo "๐Ÿ” Validating generated code compilation..." -if ! go build ./...; then - echo -e "${RED}โŒ Generated code does not compile${NC}" - cd - >/dev/null - exit 1 -fi - -echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" - -# Return to scripts directory -cd - >/dev/null - -# TypeScript module setup -echo "" -echo "๐Ÿ”ท Setting up TypeScript module..." - -# Navigate to TypeScript SDK directory -cd "$TS_OUTPUT_DIR" - -# Create package.json if it doesn't exist -if [ ! -f "package.json" ]; then - echo "๐Ÿ“ฆ Creating package.json..." - cat > package.json << 'EOF' -{ - "name": "@grove/portal-db-sdk", - "version": "1.0.0", - "description": "TypeScript SDK for Grove Portal DB API", - "main": "index.ts", - "types": "types.d.ts", - "scripts": { - "build": "tsc", - "type-check": "tsc --noEmit" - }, - "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], - "author": "Grove Team", - "license": "MIT", - "devDependencies": { - "typescript": "^5.0.0" - }, - "peerDependencies": { - "typescript": ">=4.5.0" - } -} -EOF -fi - -# Create tsconfig.json if it doesn't exist -if [ ! -f "tsconfig.json" ]; then - echo "๐Ÿ”ง Creating tsconfig.json..." - cat > tsconfig.json << 'EOF' -{ - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "lib": ["ES2020", "DOM"], - "moduleResolution": "Bundler", - "noUncheckedIndexedAccess": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "declarationMap": true, - "outDir": "./dist" - }, - "include": ["src/**/*", "models/**/*", "apis/**/*"], - "exclude": ["node_modules", "dist"] -} -EOF -fi - -echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" - -# Test TypeScript compilation if TypeScript is available -if command -v tsc >/dev/null 2>&1; then - echo "๐Ÿ” Validating TypeScript compilation..." - if ! npx tsc --noEmit; then - echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" - echo " This may be due to missing dependencies or configuration issues" - echo " The generated types.ts file should still be usable" - else - echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" - fi -else - echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" - echo " Install TypeScript globally: npm install -g typescript" -fi - -# Return to scripts directory -cd - >/dev/null - -# ============================================================================ -# SUCCESS SUMMARY -# ============================================================================ - -echo "" -echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" -echo "" -echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" -echo " API Docs: $OPENAPI_V3_FILE" -echo " Go SDK: $GO_OUTPUT_DIR" -echo " TypeScript: $TS_OUTPUT_DIR" -echo "" -echo -e "${BLUE}๐Ÿน Go SDK:${NC}" -echo " Module: github.com/grove/path/portal-db/sdk/go" -echo " Package: portaldb" -echo " Files:" -echo " โ€ข models.go - Generated data models and types (updated)" -echo " โ€ข client.go - Generated SDK client and methods (updated)" -echo " โ€ข go.mod - Go module definition (permanent)" -echo " โ€ข README.md - Documentation (permanent)" -echo "" -echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" -echo " Package: @grove/portal-db-sdk" -echo " Runtime: Zero dependencies (uses native fetch)" -echo " Files:" -echo " โ€ข apis/ - Generated API client classes (updated)" -echo " โ€ข models/ - Generated TypeScript models (updated)" -echo " โ€ข package.json - Node.js package definition (permanent)" -echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" -echo " โ€ข README.md - Documentation (permanent)" -echo "" -echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" -echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" -echo "" -echo -e "${BLUE}๐Ÿš€ Next Steps:${NC}" -echo "" -echo -e "${BLUE}Go SDK:${NC}" -echo " 1. Review generated models: cat $GO_OUTPUT_DIR/models.go | head -50" -echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" -echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" -echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" -echo "" -echo -e "${BLUE}TypeScript SDK:${NC}" -echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" -echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" -echo " 3. Copy to your React project or publish as npm package" -echo " 4. Import client: import { DefaultApi } from './apis'" -echo " 5. Use built-in methods: await client.portalApplicationsGet()" -echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" -echo "" -echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" -echo " โ€ข Go: Full client with methods, types separated for readability" -echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" -echo " โ€ข Both SDKs update automatically when you run this script" -echo " โ€ข Run after database schema changes to stay in sync" -echo " โ€ข TypeScript SDK has zero runtime dependencies" -echo "" -echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/sdk/go/README.md b/portal-db/sdk/go/README.md deleted file mode 100644 index cb30ca6fc..000000000 --- a/portal-db/sdk/go/README.md +++ /dev/null @@ -1,201 +0,0 @@ -# Portal DB Go SDK - -This Go SDK provides a type-safe client for the Portal DB API, generated using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen). - -## Installation - -```bash -go get github.com/grove/path/portal-db/sdk/go -``` - -## Quick Start - -```go -package main - -import ( - "context" - "fmt" - "log" - - "github.com/grove/path/portal-db/sdk/go" -) - -func main() { - // Create a new client with typed responses - client, err := portaldb.NewClientWithResponses("http://localhost:3000") - if err != nil { - log.Fatal(err) - } - - ctx := context.Background() - - // Example: Get public data - resp, err := client.GetNetworksWithResponse(ctx, &portaldb.GetNetworksParams{}) - if err != nil { - log.Fatal(err) - } - - if resp.StatusCode() == 200 && resp.JSON200 != nil { - networks := *resp.JSON200 - fmt.Printf("Found %d networks\n", len(networks)) - } -} -``` - -## Authentication - -For authenticated endpoints, add your JWT token to requests: - -```go -import ( - "context" - "net/http" - - "github.com/grove/path/portal-db/sdk/go" -) - -func authenticatedExample() { - client, err := portaldb.NewClientWithResponses("http://localhost:3000") - if err != nil { - log.Fatal(err) - } - - // Add JWT token to requests - token := "your-jwt-token-here" - ctx := context.Background() - - // Use RequestEditorFn to add authentication header - requestEditor := func(ctx context.Context, req *http.Request) error { - req.Header.Set("Authorization", "Bearer "+token) - return nil - } - - // Make authenticated request - resp, err := client.GetPortalAccountsWithResponse( - ctx, - &portaldb.GetPortalAccountsParams{}, - requestEditor, - ) - if err != nil { - log.Fatal(err) - } - - if resp.StatusCode() == 200 && resp.JSON200 != nil { - accounts := *resp.JSON200 - fmt.Printf("Found %d accounts\n", len(accounts)) - } else { - fmt.Printf("Authentication failed: %d\n", resp.StatusCode()) - } -} -``` - -## Query Features - -The SDK supports PostgREST's powerful query features for filtering, selecting, and pagination: - -### Filtering and Selection - -```go -// Filter active services with specific fields -resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ - Active: func() *string { s := "eq.true"; return &s }(), - Select: func() *string { s := "service_id,service_name,active,network_id"; return &s }(), - Limit: func() *string { s := "3"; return &s }(), -}) -if err != nil { - log.Fatal(err) -} - -if resp.StatusCode() == 200 && resp.JSON200 != nil { - services := *resp.JSON200 - fmt.Printf("Found %d active services\n", len(services)) -} -``` - -### Specific Resource Lookup - -```go -// Get a specific service by ID -resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ - ServiceId: func() *string { s := "eq.ethereum-mainnet"; return &s }(), -}) -if err != nil { - log.Fatal(err) -} - -if resp.StatusCode() == 200 && resp.JSON200 != nil { - services := *resp.JSON200 - fmt.Printf("Found service: %s\n", (*services)[0].ServiceName) -} -``` - -## RPC Functions - -Access custom database functions via the RPC endpoint: - -```go -// Get current user info from JWT claims -resp, err := client.PostRpcMeWithResponse( - ctx, - &portaldb.PostRpcMeParams{}, - portaldb.PostRpcMeJSONRequestBody{}, - requestEditor, -) -if err != nil { - log.Fatal(err) -} - -if resp.StatusCode() == 200 { - fmt.Printf("User info: %s\n", string(resp.Body)) -} -``` - -## Error Handling - -```go -resp, err := client.GetNetworksWithResponse(ctx, &portaldb.GetNetworksParams{}) -if err != nil { - // Handle network/client errors - log.Printf("Client error: %v", err) - return -} - -switch resp.StatusCode() { -case 200: - // Success - access typed data - if resp.JSON200 != nil { - networks := *resp.JSON200 - fmt.Printf("Found %d networks\n", len(networks)) - } -case 401: - // Unauthorized - fmt.Println("Authentication required") -default: - // Other status codes - fmt.Printf("Unexpected status: %d\n", resp.StatusCode()) -} -``` - -## Development - -This SDK was generated from the OpenAPI specification served by PostgREST. - -To regenerate run the following make target while the PostgREST API is running: - -```bash -# From the portal-db directory -make generate-all -``` - -## Generated Files - -- `models.go` - Generated data models and type definitions -- `client.go` - Generated API client methods and HTTP logic -- `go.mod` - Go module definition -- `README.md` - This documentation - -## Related Documentation - -- **API Documentation**: [../../api/README.md](../../api/README.md) -- **OpenAPI Specification**: `../../api/openapi/openapi.json` diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go deleted file mode 100644 index edbe4e2c0..000000000 --- a/portal-db/sdk/go/client.go +++ /dev/null @@ -1,13038 +0,0 @@ -// Package portaldb provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. -package portaldb - -import ( - "bytes" - "compress/gzip" - "context" - "encoding/base64" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "path" - "strings" - - "github.com/getkin/kin-openapi/openapi3" - "github.com/oapi-codegen/runtime" -) - -// RequestEditorFn is the function signature for the RequestEditor callback function -type RequestEditorFn func(ctx context.Context, req *http.Request) error - -// Doer performs HTTP requests. -// -// The standard http.Client implements this interface. -type HttpRequestDoer interface { - Do(req *http.Request) (*http.Response, error) -} - -// Client which conforms to the OpenAPI3 specification for this service. -type Client struct { - // The endpoint of the server conforming to this interface, with scheme, - // https://api.deepmap.com for example. This can contain a path relative - // to the server, such as https://api.deepmap.com/dev-test, and all the - // paths in the swagger spec will be appended to the server. - Server string - - // Doer for performing requests, typically a *http.Client with any - // customized settings, such as certificate chains. - Client HttpRequestDoer - - // A list of callbacks for modifying requests which are generated before sending over - // the network. - RequestEditors []RequestEditorFn -} - -// ClientOption allows setting custom parameters during construction -type ClientOption func(*Client) error - -// Creates a new Client, with reasonable defaults -func NewClient(server string, opts ...ClientOption) (*Client, error) { - // create a client with sane default values - client := Client{ - Server: server, - } - // mutate client and add all optional params - for _, o := range opts { - if err := o(&client); err != nil { - return nil, err - } - } - // ensure the server URL always has a trailing slash - if !strings.HasSuffix(client.Server, "/") { - client.Server += "/" - } - // create httpClient, if not already present - if client.Client == nil { - client.Client = &http.Client{} - } - return &client, nil -} - -// WithHTTPClient allows overriding the default Doer, which is -// automatically created using http.Client. This is useful for tests. -func WithHTTPClient(doer HttpRequestDoer) ClientOption { - return func(c *Client) error { - c.Client = doer - return nil - } -} - -// WithRequestEditorFn allows setting up a callback function, which will be -// called right before sending the request. This can be used to mutate the request. -func WithRequestEditorFn(fn RequestEditorFn) ClientOption { - return func(c *Client) error { - c.RequestEditors = append(c.RequestEditors, fn) - return nil - } -} - -// The interface specification for the client above. -type ClientInterface interface { - // Get request - Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteApplications request - DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApplications request - GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchApplicationsWithBody request with any body - PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApplicationsWithBody request with any body - PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteGateways request - DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetGateways request - GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchGatewaysWithBody request with any body - PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostGatewaysWithBody request with any body - PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteNetworks request - DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetNetworks request - GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchNetworksWithBody request with any body - PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostNetworksWithBody request with any body - PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteOrganizations request - DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizations request - GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchOrganizationsWithBody request with any body - PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationsWithBody request with any body - PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalAccounts request - DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalAccounts request - GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalAccountsWithBody request with any body - PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalAccountsWithBody request with any body - PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalApplications request - DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalApplications request - GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalApplicationsWithBody request with any body - PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalApplicationsWithBody request with any body - PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalPlans request - DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalPlans request - GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalPlansWithBody request with any body - PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalPlansWithBody request with any body - PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetRpcCreatePortalApplication request - GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostRpcCreatePortalApplicationWithBody request with any body - PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetRpcMe request - GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostRpcMeWithBody request with any body - PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceEndpoints request - DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceEndpoints request - GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceEndpointsWithBody request with any body - PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceEndpointsWithBody request with any body - PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceFallbacks request - DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceFallbacks request - GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceFallbacksWithBody request with any body - PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceFallbacksWithBody request with any body - PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServices request - DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServices request - GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServicesWithBody request with any body - PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServicesWithBody request with any body - PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) -} - -func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteGatewaysRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGatewaysRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteNetworksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetNetworksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteOrganizationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalAccountsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalAccountsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalApplicationsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalPlansRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalPlansRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcCreatePortalApplicationRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcMeRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewGetRequest generates requests for Get -func NewGetRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteApplicationsRequest generates requests for DeleteApplications -func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetApplicationsRequest generates requests for GetApplications -func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchApplicationsRequest calls the generic PatchApplications builder with application/json body -func NewPatchApplicationsRequest(server string, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchApplicationsRequestWithBody generates requests for PatchApplications with any type of body -func NewPatchApplicationsRequestWithBody(server string, params *PatchApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostApplicationsRequest calls the generic PostApplications builder with application/json body -func NewPostApplicationsRequest(server string, params *PostApplicationsParams, body PostApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostApplications builder with application/vnd.pgrst.object+json body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostApplicationsRequestWithBody generates requests for PostApplications with any type of body -func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteGatewaysRequest generates requests for DeleteGateways -func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetGatewaysRequest generates requests for GetGateways -func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchGatewaysRequest calls the generic PatchGateways builder with application/json body -func NewPatchGatewaysRequest(server string, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchGatewaysRequestWithBody generates requests for PatchGateways with any type of body -func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostGatewaysRequest calls the generic PostGateways builder with application/json body -func NewPostGatewaysRequest(server string, params *PostGatewaysParams, body PostGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostGateways builder with application/vnd.pgrst.object+json body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostGatewaysRequestWithBody generates requests for PostGateways with any type of body -func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteNetworksRequest generates requests for DeleteNetworks -func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetNetworksRequest generates requests for GetNetworks -func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body -func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body -func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body -func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body -func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations -func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetOrganizationsRequest generates requests for GetOrganizations -func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body -func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body -func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body -func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body -func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts -func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalAccountsRequest generates requests for GetPortalAccounts -func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body -func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body -func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body -func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body -func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications -func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalApplicationsRequest generates requests for GetPortalApplications -func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body -func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body -func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body -func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body -func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalPlansRequest generates requests for DeletePortalPlans -func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalPlansRequest generates requests for GetPortalPlans -func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body -func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body -func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body -func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body -func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcCreatePortalApplicationRequest generates requests for GetRpcCreatePortalApplication -func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreatePortalApplicationParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/create_portal_application") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_account_id", runtime.ParamLocationQuery, params.PPortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_user_id", runtime.ParamLocationQuery, params.PPortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if params.PPortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_name", runtime.ParamLocationQuery, *params.PPortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PEmoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_emoji", runtime.ParamLocationQuery, *params.PEmoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PPortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PPortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PPortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PPortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_description", runtime.ParamLocationQuery, *params.PPortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PFavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_favorite_service_ids", runtime.ParamLocationQuery, *params.PFavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PSecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_secret_key_required", runtime.ParamLocationQuery, *params.PSecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcCreatePortalApplicationRequest calls the generic PostRpcCreatePortalApplication builder with application/json body -func NewPostRpcCreatePortalApplicationRequest(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json body -func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcCreatePortalApplicationRequestWithBody generates requests for PostRpcCreatePortalApplication with any type of body -func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/create_portal_application") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcMeRequest generates requests for GetRpcMe -func NewGetRpcMeRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcMeRequest calls the generic PostRpcMe builder with application/json body -func NewPostRpcMeRequest(server string, params *PostRpcMeParams, body PostRpcMeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcMeRequestWithBody generates requests for PostRpcMe with any type of body -func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints -func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints -func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body -func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body -func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body -func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body -func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks -func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks -func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body -func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body -func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body -func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body -func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServicesRequest generates requests for DeleteServices -func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServicesRequest generates requests for GetServices -func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServicesRequest calls the generic PatchServices builder with application/json body -func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body -func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServicesRequest calls the generic PostServices builder with application/json body -func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServicesRequestWithBody generates requests for PostServices with any type of body -func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetWithResponse request - GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) - - // DeleteApplicationsWithResponse request - DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) - - // GetApplicationsWithResponse request - GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) - - // PatchApplicationsWithBodyWithResponse request with any body - PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - // PostApplicationsWithBodyWithResponse request with any body - PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - // DeleteGatewaysWithResponse request - DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) - - // GetGatewaysWithResponse request - GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) - - // PatchGatewaysWithBodyWithResponse request with any body - PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - // PostGatewaysWithBodyWithResponse request with any body - PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - // DeleteNetworksWithResponse request - DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) - - // GetNetworksWithResponse request - GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) - - // PatchNetworksWithBodyWithResponse request with any body - PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - // PostNetworksWithBodyWithResponse request with any body - PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - // DeleteOrganizationsWithResponse request - DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) - - // GetOrganizationsWithResponse request - GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) - - // PatchOrganizationsWithBodyWithResponse request with any body - PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - // PostOrganizationsWithBodyWithResponse request with any body - PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - // DeletePortalAccountsWithResponse request - DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) - - // GetPortalAccountsWithResponse request - GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) - - // PatchPortalAccountsWithBodyWithResponse request with any body - PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - // PostPortalAccountsWithBodyWithResponse request with any body - PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - // DeletePortalApplicationsWithResponse request - DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) - - // GetPortalApplicationsWithResponse request - GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) - - // PatchPortalApplicationsWithBodyWithResponse request with any body - PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - // PostPortalApplicationsWithBodyWithResponse request with any body - PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - // DeletePortalPlansWithResponse request - DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) - - // GetPortalPlansWithResponse request - GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) - - // PatchPortalPlansWithBodyWithResponse request with any body - PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - // PostPortalPlansWithBodyWithResponse request with any body - PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - // GetRpcCreatePortalApplicationWithResponse request - GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) - - // PostRpcCreatePortalApplicationWithBodyWithResponse request with any body - PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) - - PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) - - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) - - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) - - // GetRpcMeWithResponse request - GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) - - // PostRpcMeWithBodyWithResponse request with any body - PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) - - // DeleteServiceEndpointsWithResponse request - DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) - - // GetServiceEndpointsWithResponse request - GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) - - // PatchServiceEndpointsWithBodyWithResponse request with any body - PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - // PostServiceEndpointsWithBodyWithResponse request with any body - PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - // DeleteServiceFallbacksWithResponse request - DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) - - // GetServiceFallbacksWithResponse request - GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) - - // PatchServiceFallbacksWithBodyWithResponse request with any body - PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - // PostServiceFallbacksWithBodyWithResponse request with any body - PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - // DeleteServicesWithResponse request - DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) - - // GetServicesWithResponse request - GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) - - // PatchServicesWithBodyWithResponse request with any body - PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - // PostServicesWithBodyWithResponse request with any body - PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) -} - -type GetResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Applications - ApplicationvndPgrstObjectJSON200 *[]Applications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Applications -} - -// Status returns HTTPResponse.Status -func (r GetApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Gateways - ApplicationvndPgrstObjectJSON200 *[]Gateways - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Gateways -} - -// Status returns HTTPResponse.Status -func (r GetGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetNetworksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Networks - ApplicationvndPgrstObjectJSON200 *[]Networks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks -} - -// Status returns HTTPResponse.Status -func (r GetNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Organizations - ApplicationvndPgrstObjectJSON200 *[]Organizations - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts -} - -// Status returns HTTPResponse.Status -func (r GetPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications -} - -// Status returns HTTPResponse.Status -func (r GetPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans -} - -// Status returns HTTPResponse.Status -func (r GetPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcCreatePortalApplicationResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcCreatePortalApplicationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcCreatePortalApplicationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcCreatePortalApplicationResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcCreatePortalApplicationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcCreatePortalApplicationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcMeResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcMeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcMeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcMeResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcMeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcMeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints -} - -// Status returns HTTPResponse.Status -func (r GetServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks -} - -// Status returns HTTPResponse.Status -func (r GetServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServicesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Services - ApplicationvndPgrstObjectJSON200 *[]Services - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services -} - -// Status returns HTTPResponse.Status -func (r GetServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// GetWithResponse request returning *GetResponse -func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { - rsp, err := c.Get(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetResponse(rsp) -} - -// DeleteApplicationsWithResponse request returning *DeleteApplicationsResponse -func (c *ClientWithResponses) DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) { - rsp, err := c.DeleteApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteApplicationsResponse(rsp) -} - -// GetApplicationsWithResponse request returning *GetApplicationsResponse -func (c *ClientWithResponses) GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) { - rsp, err := c.GetApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApplicationsResponse(rsp) -} - -// PatchApplicationsWithBodyWithResponse request with arbitrary body returning *PatchApplicationsResponse -func (c *ClientWithResponses) PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchApplicationsResponse(rsp) -} - -// PostApplicationsWithBodyWithResponse request with arbitrary body returning *PostApplicationsResponse -func (c *ClientWithResponses) PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApplicationsResponse(rsp) -} - -// DeleteGatewaysWithResponse request returning *DeleteGatewaysResponse -func (c *ClientWithResponses) DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) { - rsp, err := c.DeleteGateways(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteGatewaysResponse(rsp) -} - -// GetGatewaysWithResponse request returning *GetGatewaysResponse -func (c *ClientWithResponses) GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) { - rsp, err := c.GetGateways(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetGatewaysResponse(rsp) -} - -// PatchGatewaysWithBodyWithResponse request with arbitrary body returning *PatchGatewaysResponse -func (c *ClientWithResponses) PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGateways(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchGatewaysResponse(rsp) -} - -// PostGatewaysWithBodyWithResponse request with arbitrary body returning *PostGatewaysResponse -func (c *ClientWithResponses) PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGateways(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostGatewaysResponse(rsp) -} - -// DeleteNetworksWithResponse request returning *DeleteNetworksResponse -func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { - rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteNetworksResponse(rsp) -} - -// GetNetworksWithResponse request returning *GetNetworksResponse -func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { - rsp, err := c.GetNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetNetworksResponse(rsp) -} - -// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse -func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse -func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse -func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { - rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteOrganizationsResponse(rsp) -} - -// GetOrganizationsWithResponse request returning *GetOrganizationsResponse -func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { - rsp, err := c.GetOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationsResponse(rsp) -} - -// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse -func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse -func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse -func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { - rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalAccountsResponse(rsp) -} - -// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse -func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { - rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalAccountsResponse(rsp) -} - -// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse -func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse -func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse -func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { - rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalApplicationsResponse(rsp) -} - -// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse -func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { - rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalApplicationsResponse(rsp) -} - -// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse -func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse -func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse -func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { - rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalPlansResponse(rsp) -} - -// GetPortalPlansWithResponse request returning *GetPortalPlansResponse -func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { - rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalPlansResponse(rsp) -} - -// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse -func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse -func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -// GetRpcCreatePortalApplicationWithResponse request returning *GetRpcCreatePortalApplicationResponse -func (c *ClientWithResponses) GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) { - rsp, err := c.GetRpcCreatePortalApplication(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcCreatePortalApplicationResponse(rsp) -} - -// PostRpcCreatePortalApplicationWithBodyWithResponse request with arbitrary body returning *PostRpcCreatePortalApplicationResponse -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcCreatePortalApplicationResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplication(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcCreatePortalApplicationResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcCreatePortalApplicationResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcCreatePortalApplicationResponse(rsp) -} - -// GetRpcMeWithResponse request returning *GetRpcMeResponse -func (c *ClientWithResponses) GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) { - rsp, err := c.GetRpcMe(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcMeResponse(rsp) -} - -// PostRpcMeWithBodyWithResponse request with arbitrary body returning *PostRpcMeResponse -func (c *ClientWithResponses) PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMe(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcMeResponse(rsp) -} - -// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse -func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { - rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceEndpointsResponse(rsp) -} - -// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse -func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { - rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceEndpointsResponse(rsp) -} - -// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse -func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse -func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse -func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { - rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceFallbacksResponse(rsp) -} - -// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse -func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { - rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceFallbacksResponse(rsp) -} - -// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse -func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse -func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -// DeleteServicesWithResponse request returning *DeleteServicesResponse -func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { - rsp, err := c.DeleteServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServicesResponse(rsp) -} - -// GetServicesWithResponse request returning *GetServicesResponse -func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { - rsp, err := c.GetServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServicesResponse(rsp) -} - -// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse -func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse -func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -// ParseGetResponse parses an HTTP response from a GetWithResponse call -func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteApplicationsResponse parses an HTTP response from a DeleteApplicationsWithResponse call -func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetApplicationsResponse parses an HTTP response from a GetApplicationsWithResponse call -func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Applications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchApplicationsResponse parses an HTTP response from a PatchApplicationsWithResponse call -func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostApplicationsResponse parses an HTTP response from a PostApplicationsWithResponse call -func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteGatewaysResponse parses an HTTP response from a DeleteGatewaysWithResponse call -func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetGatewaysResponse parses an HTTP response from a GetGatewaysWithResponse call -func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Gateways - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchGatewaysResponse parses an HTTP response from a PatchGatewaysWithResponse call -func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostGatewaysResponse parses an HTTP response from a PostGatewaysWithResponse call -func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostGatewaysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call -func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call -func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call -func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call -func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call -func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call -func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call -func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call -func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call -func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call -func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call -func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call -func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call -func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call -func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call -func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call -func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call -func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call -func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call -func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call -func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetRpcCreatePortalApplicationResponse parses an HTTP response from a GetRpcCreatePortalApplicationWithResponse call -func ParseGetRpcCreatePortalApplicationResponse(rsp *http.Response) (*GetRpcCreatePortalApplicationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetRpcCreatePortalApplicationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostRpcCreatePortalApplicationResponse parses an HTTP response from a PostRpcCreatePortalApplicationWithResponse call -func ParsePostRpcCreatePortalApplicationResponse(rsp *http.Response) (*PostRpcCreatePortalApplicationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostRpcCreatePortalApplicationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetRpcMeResponse parses an HTTP response from a GetRpcMeWithResponse call -func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetRpcMeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostRpcMeResponse parses an HTTP response from a PostRpcMeWithResponse call -func ParsePostRpcMeResponse(rsp *http.Response) (*PostRpcMeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostRpcMeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call -func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call -func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call -func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call -func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServiceEndpointsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call -func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call -func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call -func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call -func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServiceFallbacksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call -func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call -func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil -} - -// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call -func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call -func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostServicesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// Base64 encoded, gzipped, json marshaled Swagger object -var swaggerSpec = []string{ - - "H4sIAAAAAAAC/+w9XW/ctpZ/hdAukBQ7sd30A7he5CFN27vd26aGk+w+NMFcWuLMsJYohaTs+Bb+7xfU", - "JyVSEiVSGsfRSxCPDs85Is+3eMi/PD+Okpggwpl3/peXQAojxBHN/gpxhLn4T4CYT3HCcUy8c+9X8TMm", - "ewBJAC7gHhOYPdl4WDz+mCJ65208AiPknRdINh7zDyiCAhu/S8QDxikme+/+fuPFux1D1pQKLAOkaICo", - "Sul38bOA6UCdjerHnFC0Q/RVnBLNm1xkDxHxUUnhgGCOsyCRQzRoIJJG3vkfni9wviAxQd6HTSflC7F2", - "zDHpTCDYC4bJPkTP4qs/kc97mYiZ67eniKeUvKAooYghwksRKH6PMMERDOsfsnkSf7E4TAXsC7wnMUXP", - "gjQJsQ85Ys3HEaL7xtOe97vMaDyEN9QySSHZo9F61Gb1MsPSL+0ZpXdkgn3QUnuWoZJJBmgH05B75x7m", - "KBJLpmEivv0ZhxzRE5jkq4djwuQ/tjAIKGIatfghjP1r/wAxAQUMiHeAHxCQhneYAx0BmfddTCMoWPcP", - "kEKfIwpuIL3L7cuk10govoEcba/R3faAPgkiQ4y1h7hn0KcIchRsIe/iR4LQkuc4QozDKAG3mB+A+BP8", - "K9dfYy72kKNbeCevtI6VNpj76SCI38b0eouDLh4kCPfkGaI32Ec95CWIGchzeI22MCr9n5YBGUbLwhXe", - "4+zZSLoBInHUTzYHcf/iaRIMaIEE4VILCok+oh5WHGh00NTaFkM7LO0sWquwbWhdu8DdMrW8GalIt3W4", - "uYYvs9+zdYuvEWEgAw/A1Z3BQjpS/Rary6p9RfxoKl+s/DGEJKZ7SPC/ju36m2wEKEQ1G01xfRPvOMgB", - "QEWsQzolPPMxK//Vs3BtMC1DmHC0z6LoifRzYu05ew0jVBpmGbwzLW5jnEHUjqZsSUw5DLfQz/JvdnKF", - "wxCT/TYfo2elAeNkMtpcHE3z2ow0dW9BrWozsveT8o8etWpBzbI2ggYiHPMQRWiQmxbkLBwJO0FJ/Uul", - "9zqm9MCz8LW8LWxz0Py74KFpDd8R/DFFAAdipXYYUbCLaWYb88GgGNxhHVUKs0xli0zKEN1WlVsDvqQB", - "801vTWSbSdkNDEezV4/U8pmkVyH2T5IQEhnSDdM0YeP5FYPcT2n2gn0+SIGbRewEUIK2LL2qVEarRG8y", - "OCDDtTWqcJqdmYOW0Cwv9WBijUyKTGy2Cuh0Yh5EuU/HzNGjD5kZFMV/4i4+8oezrcoO3sQUc7Stq3ud", - "pkoLa8bZHx8m8Kb1sUdwlTqepEp5w2D1M9gxakluh2exCbwkb32Wqgt8Sf7MgyP9IAfe3JhD40BpYLTr", - "YMn8BQyCpu6BjqeaIZ8inpdsITuoccr/QHZAAcjhwDW6y0ITCQeAKT+IuKX302CbzmzSLRGi6GOKKer5", - "7qOC6kuwcRwiSCZwc+zASQgyy8VZlql+VddD2wuexAyFHDW1oSl1l5AjkD0HmACxOohxBhJEhSTGJOjK", - "LTXInTKeMrhH244dQL/BTzhKI5ABARiG8S0KsnXDJMuPJZPSyb1MYS7Wh21o5wDHZrPg7yGkcHpWRkRB", - "+jFOWCwDU0SCJMZHrXeqrJT/6wnBZBALoe6h3Sc2TaA+CW5DjmNm+a0GKg9H8zglKzsYhlfQv34AIlqz", - "Uv5vm9KwOwuUYJyuTs1H+xcDUZFBHaiOysvy0lrzcGxpZSfQ5/im03IUTy2iworQFeKw8/OYeOaCiB9H", - "mOy3LO52VjKII5JJytE2JZizbYLolqIQ3qnR0auYZdFcMQBkA7JsAkH/APJRmy6etTTs9eH4VuqINbuK", - "gwOkQW1oEIFXYXfapAd2IUrL796oSH9MYYj5nfEkdMK7mIfSTgZxBDHRpEf/B0McgOJx8fUNM1CM60zB", - "m1gdFTgVrhf3JzXpvjpbA2Ye8vEtQXRow60e2DFDN/st9rt9QPVcb03QJ25KaWEHzlCIfE3mnbOFyR68", - "isM0yqRbP/nZ+L49/OI983rDD3GAUbaOck1H/O3HhKN8L6D06PRPlk95jfw/Kdp5595/nNb9RKf5U3ba", - "QCrIyqhuSHCS7CnjJ3lzyX/Njfu/SRqG7EX2VTHJ7d5EUkJ8Tn12MxnF/aa1us3nm3LDqbulqBA6XoZx", - "eCcvQYPM+OmXhitTXz/blM7X3bRXCB1P+zi8k6e9QWb8tEvDlWmvn20am33czX0Tq+MFmIB88iqotMYv", - "RRuHsh4tgE3ry6y7ZWnjdbwwk9BPXhodtfGLo2JRlkcB2Wi+pLlfpBkd+GQS1otl7871mDoXreXc5Wq8", - "6xXLkc6zVCNw265RTWry4pQoulaleL7xlAqzszVRMTtemIkEJq+Ont74JdLhUdZJA7RRasbuF6vGPNNi", - "jSRgvVhNetMXS8bTuVgSULVYztdorqVZaEUsF6Jv/nPUxQBdXt86/IIUnZkSVFZsS2jsI8Yw2edVawb4", - "gcbp/pB95C9id2/jJTROEOVqEcGy/f49eU9exxydvydvD5gBzAAEFxRHkN6Bf6C7k/fp2dk3fnJ9mv0H", - "eZv+mlIEP/2KyJ4fvPPvzpSyy8Yb6Lg3xf39txrczfJ7fbrBq3eXlz+9frt9+8tvP715+/K3C/klzGtG", - "G2+wB1eZyZ9jivCeiJkEPAb/7Grn/Wcxz7trwOFViF48KSGfAD8rQ1W/lEOeOFqRZqV85PtouiXVVymB", - "6lepoSe8xbfPNW/RrBiPfAtN3Vl9ixKofosa2tlbtLqDOzt3yw9T1ZiqTdeU/tffaeg3S7DONaioh+Yb", - "6f7oOOND048u1/olca3PZylOzWnV8/QmuIAAmORvkHVLED9MA2GEs9nMjlUpCIEAcYhDptjg41ubwY7/", - "pY17T7O/lWF/JCbKTev/47YJGu1vHWvQOHJgwBrIZeZWz1SaiPRUTHCtRSU4eHoR+9eIgwhiQhDfAI4Y", - "z/6DuH/ylWILRgmoGwXUiFhrKgfmRqkFt7dYRAkkGDEQU+CnjMcRomBP4zQRMSrkwIcEXCEAOYf+AQVC", - "2S7yps2XZfFscZs55bSCSYQ03bVull3ZciKptd3xAsYm+G9HtwJqU7L66jqZ1pTSW9uq05DjZxwRSHjZ", - "W8xy7rIyVeb5i2bJbIv1npbT15Tk9kkFppP7/OwYiUtTLaZFI8oRAMav/N13HfjURn47nJ2t+FZ+e7yq", - "t0OQ3kNK1GCkAV5HJK1xT0Yaj45u/FLW9ohsKSRBHG3TFAdPhZOb1qs/Y9T5zfea9entzp8yNR0NYuVZ", - "kkEWhkUx4Qdv490hSIUtGtnAsPEGO+HHsN5odxgpnb09C6p0yuC1cLbHuQuaZ+iBt7MyM7vCjaftTHcX", - "F+o6gRUx6vOuvZXOl3KFs3BsZd9S004UfpcfEKYgviWAVp1auR9miHNM9kcPIyehqBrWjZMvnW3raj0f", - "2GSZn+eq7kirKEBK4V2PV5hiQLrPfek0IuUQxY7UY5849hLdTel2VqGzjXyMiz2G29T0lltZ7MGe8FEu", - "ebhveya33NtvbfQKc/RD28loR0NzJaE7GDJUjSt3mi+e/XUdsqDaqh4vVW36aLmnG4hDYYOaoUKe/Inp", - "HyphdDdAm8m1q5Zlc2rO+ownkVxAV8cEv7MV3zbeULuvOfIzQw3pD9e02226tKEEAgKN1EpV94EsHIK1", - "OoHnL64p7b/13RAR4j/8/NbbeH7MoljYhMuf3oi///fN76+fXV688jbe/7954228vfhDI8oDzcCP5fvl", - "sn6i1Qlez2CfNjT2M7U6P4pH4N3lr7kKlHMGbg+IgKQQskqhwA7icHnVaHcg2wYF2j7i+RVuFfnxIt/R", - "yS1/IG9IR48mmH4Uq3RgR+MoCwmKj2OvuzYnVW3Qw4Fl2ck8DNlqRzYa4LSZ2EimP4fKRGeH7vCcPo4P", - "8X0NusNzYN9R66x4M8qCzhj5tntmzUtef+vBprTAWu1NkftYB9pTj2XUG7a87C1uSZtq0AU29Cn/8PVj", - "7OuuJ4sZ34uIFfwY+2kkXX+VBRDegfOEnZ+eJgKOIsZPYro/ReT05uvnJ2enMMEnBx6F+Re2XZyJJuZh", - "cQEECSANQB7ngmJ/7ca7QZTl1AWOk+fgKfwWnZ3tdl9ln9QSRGCCvXPvm5OzkzPhQiA/ZKyfin/2+VV1", - "wqtkrP4SeOfe37Ob5yhiSUxY7mqen51pNnr9I9+bm0ZC3sUPCSIvL34BEhh4mulkUMzHV2KN4J6J1fiF", - "cBqzBPkZug8C1ala8hZWWGXxx+x3uQSevVp9498f+o3HNcjpiAu37jdTsbV32UzHJMmuBRJ5i48tmnxr", - "0HQsfTuUp2OVPOd0JFJ0MR2JZNsMkDTu5Lv/oOjftzrPA14VPQgtPbTdBF+qaEMdP9xvOu3FqomrJj4W", - "TSzOmzCAzK9SNeEru4XSFDC7P9KEfH5JrAFkXpM2tkL5xa8aI3Q2qu+piq/Nz5Foh97jm6IWItrbMeWG", - "B307lQvcSq+ViOQ23vOz7zUxLaQcw3BxT5NA7h9UX3Mhfl69zeptHnHcVx5kdNel5o2zjhRlf5CBY1Jc", - "pt3S5pjZhY7mvlq603uOWf5aU+7MhWmhKRbZc7Mnqy9z/nsJOd16dl6YOkpz9Pd12qCYYJ5095VOQ9DV", - "mDUN21RzpLvc80gp6PQmwFLOK6Huyz9XeV7leU3kjprIyafOLZLE2RG0T+B66Vskbz143Sduju1zX9a2", - "2ujVRs+Q/sjq8vAClu68Z7I6LJfz9Ezt6HzH6byKZKfZct6X7LwuIacbHt1l9QtH1LaN9OU0VvPWF08f", - "b8rWoG3JoE0+s3aRoM2OoH3Q1kvfImjrwesuaJvFBPSFbA/Kco50XvKKPDSz2x0VTJ7x5aKCnok1jgpm", - "mFURE2iOWukLDH5vgE+X8d5jB8aF0T2oso1qFsikHa0WWKbmB00sxytMOjpupxTApsT1hVSrsH0ewrYG", - "oEsGoMoh/YtEoQ6o2oeiw0xYxKNDyN0FpbMb1L4AdTWqn60HHxl1KgL9kGOA7vjeTmCXC/KHpts40p95", - "rkXUrz2Mri/uz9HLJw9MNBuDB7KM07A2Ois71MFb3cpuhU09OskKnf5AORfvqzmtbB609QEKM+GnCbND", - "3ThK0QpTx2FhVjhb5x5a42qdeWiFb6rjbeOZ6noV7Tta+mxxrmdpwtvmui9pXi31aqlXS71a6i/EUq+1", - "pyVrT5obCBepPjmha19/MmHDogI1jN5dDWqmqKSv8rRGJmtkskYma2Ty5eaQIyuKGn/w8PLQ7sKtpb1f", - "rnI7PM/GtdtZJlmu2I467aVYATe9vxoOTvTH4U5SMh1aS7s0wOl0Zycjzg9Tn4M/W99pjN7Sh5rTmexL", - "B0jImmmNX3uuvTXW9onbLhFWB3ZZI7X1uC46w3W4jle9nefOiLatNz00aDXoq0FfDfpq0L8wg74WeY9R", - "5D3GMVPOaLsr9s546JQZCXdF3+MEMwY14TWgWQOaNaBZA5ovOEOdWLN0d5LZkZzDUPn48zjrzGw5jMvI", - "x1gLqcosXVA2XF6+yICtvbb+jtdJiqlHZW2DC7Tte8vcobLzchLO1iVultjUG+WWrsGNvxivJeq5QA9X", - "1lZZXmV5LT88iPJDrrIL1x0siDorOHTzYF9p6MLtsMTg0FYPFw5We73a6xmzq0pdHkjwMpQsTVOHxbOk", - "rmk1T4+czalIemjin+Y51lbNjKQrnzRXqUGOGEgZoiBC0RWi7IATUNxOXCRo4ArtYoryLA7H5AS8J7lo", - "shxMulO7OMFNOuVNQOwREcvduI77pLg+bZcSPz8YjgH0KYkZCsANhqC+VwsycPH7m7dg4DU3akh8mfj5", - "9CuZuCpiWEzJxxTRO2/j5XeteclWrZLKt4txmqKN5Mh671BTrikboJnV9JYkqNRt3VPKC7mLvIFU2dXS", - "675ociIZ+TJtDb2B+7anEhUeas73k02G+3XT1oHNyGS3ORoT0lVytXT0lxZ25Q0Dd+PlxocBWJW8JFOZ", - "Vb1gGALIWOzjzDxe/vDyFUCEU4yEDQUQMEz2IQKQxxH2AaeQMOjnVljyCU9p4n8Fum2j7Hq/KCcgEIzx", - "Ambhg/iB6QII4zxSFyPMJSfvyaNb5OadyKVfGWmWNl0GaNjumN8iqwshJvA5YJndYDS6YdYMleR9zZzS", - "xty9jvCqGyP/OZrDMjSbMFc6R2Tgf5p32urjUoU9zXW2o2tPq6FaDdVqqFZD9QANVW+9erVbq91a7dZq", - "t5a3W/pvXKs9Wu3Rao9We7S0Pbpvfz64/9wrmeUHr1x0u3ZDXSb+b8gb8a5NBiI08LmyxH+k+qF1Xu86", - "3jb1g07lU7NmQjpK045IkMTY6HTYN/mQn6oR03dkKNRPyv+NbrJQUU29GbyHqfEbRVRkU/ehq5iO2Cdd", - "fZIvuQFiavLP8Qj6B1BwK1krVdL6dmiuQvZZCtm6eXLJzZOqSi21g9IRZfttlGaMWOylNCEwx4ZKW8Pa", - "t51yNa6PxYOP3JKnFeYHEQd0Zw/WwrrcjkeT6Z2w7dFubuUofwfD8Ar61+ZR/s/VCHsbUVFXfpms4SpK", - "e0wVUykNbXHZmooa0/GC/VIEwLvLX3PpK7hj4PaACEgoFpCVmDKwgzjUSGUtfQaR/yp4n6XgrQnAMRKA", - "WrOWTgAsKbtLAPoZcZAA9BFwlwDMZGwNsoHV4D4WTz8xam0I+MOLFwYzhOkCvHyG0DfXxhnCLBMtpQvm", - "WYIDm2Gt1zWC8QcpVSgEYMrRNiWYs22C6JaiMPtYbcNQEEcQE2aJJb4liG5hEFDEpuIad8m8BgH0Ob6Z", - "OrtXiMPpC4PJfsvisS21FYaPKQwxv6s9ESIiu546EQdIA1e42M1+i/3Jbzb1lKR6cu181zGTU+1F+ZUZ", - "3NE4yrbeFBfmv87FXzWBRinpauVWK7daudXKrZWQB1sJWbwAcuy6x1zljnmrHE69tkFtY/Xcq+dePffq", - "uRcuqdlW0tyayaH62WdQN7MqlzmczQwxojflPKU09M69A+fJ+elpGPswPMSMn39zdnbm3X+4/3cAAAD/", - "/5yitW57IQEA", -} - -// GetSwagger returns the content of the embedded swagger specification file -// or error if failed to decode -func decodeSpec() ([]byte, error) { - zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) - if err != nil { - return nil, fmt.Errorf("error base64 decoding spec: %w", err) - } - zr, err := gzip.NewReader(bytes.NewReader(zipped)) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %w", err) - } - var buf bytes.Buffer - _, err = buf.ReadFrom(zr) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %w", err) - } - - return buf.Bytes(), nil -} - -var rawSpec = decodeSpecCached() - -// a naive cached of a decoded swagger spec -func decodeSpecCached() func() ([]byte, error) { - data, err := decodeSpec() - return func() ([]byte, error) { - return data, err - } -} - -// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. -func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { - res := make(map[string]func() ([]byte, error)) - if len(pathToFile) > 0 { - res[pathToFile] = rawSpec - } - - return res -} - -// GetSwagger returns the Swagger specification corresponding to the generated code -// in this file. The external references of Swagger specification are resolved. -// The logic of resolving external references is tightly connected to "import-mapping" feature. -// Externally referenced files must be embedded in the corresponding golang packages. -// Urls can be supported but this task was out of the scope. -func GetSwagger() (swagger *openapi3.T, err error) { - resolvePath := PathToRawSpec("") - - loader := openapi3.NewLoader() - loader.IsExternalRefsAllowed = true - loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { - pathToFile := url.String() - pathToFile = path.Clean(pathToFile) - getSpec, ok := resolvePath[pathToFile] - if !ok { - err1 := fmt.Errorf("path not found: %s", pathToFile) - return nil, err1 - } - return getSpec() - } - var specData []byte - specData, err = rawSpec() - if err != nil { - return - } - swagger, err = loader.LoadFromData(specData) - if err != nil { - return - } - return -} diff --git a/portal-db/sdk/go/go.mod b/portal-db/sdk/go/go.mod deleted file mode 100644 index e649ced68..000000000 --- a/portal-db/sdk/go/go.mod +++ /dev/null @@ -1,25 +0,0 @@ -module github.com/grove/path/portal-db/sdk/go - -go 1.22.5 - -toolchain go1.24.3 - -require ( - github.com/getkin/kin-openapi v0.133.0 - github.com/oapi-codegen/runtime v1.1.1 -) - -require ( - github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect - github.com/google/uuid v1.5.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect - github.com/woodsbury/decimal128 v1.3.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/portal-db/sdk/go/go.sum b/portal-db/sdk/go/go.sum deleted file mode 100644 index 65805ac2a..000000000 --- a/portal-db/sdk/go/go.sum +++ /dev/null @@ -1,54 +0,0 @@ -github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= -github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= -github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= -github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= -github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= -github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go deleted file mode 100644 index 80f774695..000000000 --- a/portal-db/sdk/go/models.go +++ /dev/null @@ -1,2033 +0,0 @@ -// Package portaldb provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. -package portaldb - -// Defines values for PortalAccountsPortalAccountUserLimitInterval. -const ( - PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" - PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" - PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" -) - -// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. -const ( - PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" - PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" - PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" -) - -// Defines values for PortalPlansPlanUsageLimitInterval. -const ( - Day PortalPlansPlanUsageLimitInterval = "day" - Month PortalPlansPlanUsageLimitInterval = "month" - Year PortalPlansPlanUsageLimitInterval = "year" -) - -// Defines values for ServiceEndpointsEndpointType. -const ( - CometBFT ServiceEndpointsEndpointType = "cometBFT" - Cosmos ServiceEndpointsEndpointType = "cosmos" - GRPC ServiceEndpointsEndpointType = "gRPC" - JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" - REST ServiceEndpointsEndpointType = "REST" - WSS ServiceEndpointsEndpointType = "WSS" -) - -// Defines values for PreferCount. -const ( - PreferCountCountNone PreferCount = "count=none" -) - -// Defines values for PreferParams. -const ( - PreferParamsParamsSingleObject PreferParams = "params=single-object" -) - -// Defines values for PreferPost. -const ( - PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" - PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" - PreferPostReturnMinimal PreferPost = "return=minimal" - PreferPostReturnNone PreferPost = "return=none" - PreferPostReturnRepresentation PreferPost = "return=representation" -) - -// Defines values for PreferReturn. -const ( - PreferReturnReturnMinimal PreferReturn = "return=minimal" - PreferReturnReturnNone PreferReturn = "return=none" - PreferReturnReturnRepresentation PreferReturn = "return=representation" -) - -// Defines values for DeleteApplicationsParamsPrefer. -const ( - DeleteApplicationsParamsPreferReturnMinimal DeleteApplicationsParamsPrefer = "return=minimal" - DeleteApplicationsParamsPreferReturnNone DeleteApplicationsParamsPrefer = "return=none" - DeleteApplicationsParamsPreferReturnRepresentation DeleteApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetApplicationsParamsPrefer. -const ( - GetApplicationsParamsPreferCountNone GetApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchApplicationsParamsPrefer. -const ( - PatchApplicationsParamsPreferReturnMinimal PatchApplicationsParamsPrefer = "return=minimal" - PatchApplicationsParamsPreferReturnNone PatchApplicationsParamsPrefer = "return=none" - PatchApplicationsParamsPreferReturnRepresentation PatchApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostApplicationsParamsPrefer. -const ( - PostApplicationsParamsPreferResolutionIgnoreDuplicates PostApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostApplicationsParamsPreferResolutionMergeDuplicates PostApplicationsParamsPrefer = "resolution=merge-duplicates" - PostApplicationsParamsPreferReturnMinimal PostApplicationsParamsPrefer = "return=minimal" - PostApplicationsParamsPreferReturnNone PostApplicationsParamsPrefer = "return=none" - PostApplicationsParamsPreferReturnRepresentation PostApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeleteGatewaysParamsPrefer. -const ( - DeleteGatewaysParamsPreferReturnMinimal DeleteGatewaysParamsPrefer = "return=minimal" - DeleteGatewaysParamsPreferReturnNone DeleteGatewaysParamsPrefer = "return=none" - DeleteGatewaysParamsPreferReturnRepresentation DeleteGatewaysParamsPrefer = "return=representation" -) - -// Defines values for GetGatewaysParamsPrefer. -const ( - GetGatewaysParamsPreferCountNone GetGatewaysParamsPrefer = "count=none" -) - -// Defines values for PatchGatewaysParamsPrefer. -const ( - PatchGatewaysParamsPreferReturnMinimal PatchGatewaysParamsPrefer = "return=minimal" - PatchGatewaysParamsPreferReturnNone PatchGatewaysParamsPrefer = "return=none" - PatchGatewaysParamsPreferReturnRepresentation PatchGatewaysParamsPrefer = "return=representation" -) - -// Defines values for PostGatewaysParamsPrefer. -const ( - PostGatewaysParamsPreferResolutionIgnoreDuplicates PostGatewaysParamsPrefer = "resolution=ignore-duplicates" - PostGatewaysParamsPreferResolutionMergeDuplicates PostGatewaysParamsPrefer = "resolution=merge-duplicates" - PostGatewaysParamsPreferReturnMinimal PostGatewaysParamsPrefer = "return=minimal" - PostGatewaysParamsPreferReturnNone PostGatewaysParamsPrefer = "return=none" - PostGatewaysParamsPreferReturnRepresentation PostGatewaysParamsPrefer = "return=representation" -) - -// Defines values for DeleteNetworksParamsPrefer. -const ( - DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" - DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" - DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" -) - -// Defines values for GetNetworksParamsPrefer. -const ( - GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" -) - -// Defines values for PatchNetworksParamsPrefer. -const ( - PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" - PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" - PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" -) - -// Defines values for PostNetworksParamsPrefer. -const ( - PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" - PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" - PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" - PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" - PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" -) - -// Defines values for DeleteOrganizationsParamsPrefer. -const ( - DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" - DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" - DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for GetOrganizationsParamsPrefer. -const ( - GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" -) - -// Defines values for PatchOrganizationsParamsPrefer. -const ( - PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" - PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" - PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for PostOrganizationsParamsPrefer. -const ( - PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" - PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" - PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" - PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" - PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalAccountsParamsPrefer. -const ( - DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" - DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" - DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalAccountsParamsPrefer. -const ( - GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalAccountsParamsPrefer. -const ( - PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" - PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" - PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalAccountsParamsPrefer. -const ( - PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" - PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" - PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" - PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" - PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalApplicationsParamsPrefer. -const ( - DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" - DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" - DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalApplicationsParamsPrefer. -const ( - GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalApplicationsParamsPrefer. -const ( - PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" - PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" - PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalApplicationsParamsPrefer. -const ( - PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" - PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" - PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" - PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalPlansParamsPrefer. -const ( - DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" - DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" - DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" -) - -// Defines values for GetPortalPlansParamsPrefer. -const ( - GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" -) - -// Defines values for PatchPortalPlansParamsPrefer. -const ( - PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" - PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" - PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for PostPortalPlansParamsPrefer. -const ( - PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" - PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" - PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" - PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" - PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for PostRpcCreatePortalApplicationParamsPrefer. -const ( - PostRpcCreatePortalApplicationParamsPreferParamsSingleObject PostRpcCreatePortalApplicationParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcMeParamsPrefer. -const ( - ParamsSingleObject PostRpcMeParamsPrefer = "params=single-object" -) - -// Defines values for DeleteServiceEndpointsParamsPrefer. -const ( - DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" - DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" - DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for GetServiceEndpointsParamsPrefer. -const ( - GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" -) - -// Defines values for PatchServiceEndpointsParamsPrefer. -const ( - PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" - PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" - PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for PostServiceEndpointsParamsPrefer. -const ( - PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" - PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" - PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" - PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" - PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for DeleteServiceFallbacksParamsPrefer. -const ( - DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" - DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" - DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for GetServiceFallbacksParamsPrefer. -const ( - GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" -) - -// Defines values for PatchServiceFallbacksParamsPrefer. -const ( - PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" - PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" - PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for PostServiceFallbacksParamsPrefer. -const ( - PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" - PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" - PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" - PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" - PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for DeleteServicesParamsPrefer. -const ( - DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" - DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" - DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" -) - -// Defines values for GetServicesParamsPrefer. -const ( - CountNone GetServicesParamsPrefer = "count=none" -) - -// Defines values for PatchServicesParamsPrefer. -const ( - PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" - PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" - PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" -) - -// Defines values for PostServicesParamsPrefer. -const ( - PostServicesParamsPreferResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" - PostServicesParamsPreferResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" - PostServicesParamsPreferReturnMinimal PostServicesParamsPrefer = "return=minimal" - PostServicesParamsPreferReturnNone PostServicesParamsPrefer = "return=none" - PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" -) - -// Applications Onchain applications for processing relays through the network -type Applications struct { - // ApplicationAddress Blockchain address of the application - // - // Note: - // This is a Primary Key. - ApplicationAddress string `json:"application_address"` - ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Note: - // This is a Foreign Key to `gateways.gateway_address`. - GatewayAddress string `json:"gateway_address"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - StakeAmount *int `json:"stake_amount,omitempty"` - StakeDenom *string `json:"stake_denom,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Gateways Onchain gateway information including stake and network details -type Gateways struct { - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Blockchain address of the gateway - // - // Note: - // This is a Primary Key. - GatewayAddress string `json:"gateway_address"` - GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount int `json:"stake_amount"` - StakeDenom string `json:"stake_denom"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) -type Networks struct { - // NetworkId Note: - // This is a Primary Key. - NetworkId string `json:"network_id"` -} - -// Organizations Companies or customer groups that can be attached to Portal Accounts -type Organizations struct { - CreatedAt *string `json:"created_at,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *string `json:"deleted_at,omitempty"` - - // OrganizationId Note: - // This is a Primary Key. - OrganizationId int `json:"organization_id"` - - // OrganizationName Name of the organization - OrganizationName string `json:"organization_name"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalAccounts Multi-tenant accounts with plans and billing integration -type PortalAccounts struct { - BillingType *string `json:"billing_type,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - GcpAccountId *string `json:"gcp_account_id,omitempty"` - GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` - InternalAccountName *string `json:"internal_account_name,omitempty"` - - // OrganizationId Note: - // This is a Foreign Key to `organizations.organization_id`. - OrganizationId *int `json:"organization_id,omitempty"` - - // PortalAccountId Unique identifier for the portal account - // - // Note: - // This is a Primary Key. - PortalAccountId string `json:"portal_account_id"` - PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` - - // PortalPlanType Note: - // This is a Foreign Key to `portal_plans.portal_plan_type`. - PortalPlanType string `json:"portal_plan_type"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - UserAccountName *string `json:"user_account_name,omitempty"` -} - -// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. -type PortalAccountsPortalAccountUserLimitInterval string - -// PortalApplications Applications created within portal accounts with their own rate limits and settings -type PortalApplications struct { - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - Emoji *string `json:"emoji,omitempty"` - FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` - - // PortalAccountId Note: - // This is a Foreign Key to `portal_accounts.portal_account_id`. - PortalAccountId string `json:"portal_account_id"` - PortalApplicationDescription *string `json:"portal_application_description,omitempty"` - - // PortalApplicationId Note: - // This is a Primary Key. - PortalApplicationId string `json:"portal_application_id"` - PortalApplicationName *string `json:"portal_application_name,omitempty"` - PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *string `json:"secret_key_hash,omitempty"` - SecretKeyRequired *bool `json:"secret_key_required,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. -type PortalApplicationsPortalApplicationUserLimitInterval string - -// PortalPlans Available subscription plans for Portal Accounts -type PortalPlans struct { - PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` - - // PortalPlanType Note: - // This is a Primary Key. - PortalPlanType string `json:"portal_plan_type"` - PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` -} - -// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. -type PortalPlansPlanUsageLimitInterval string - -// ServiceEndpoints Available endpoint types for each service -type ServiceEndpoints struct { - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId Note: - // This is a Primary Key. - EndpointId int `json:"endpoint_id"` - EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. -type ServiceEndpointsEndpointType string - -// ServiceFallbacks Fallback URLs for services when primary endpoints fail -type ServiceFallbacks struct { - CreatedAt *string `json:"created_at,omitempty"` - FallbackUrl string `json:"fallback_url"` - - // ServiceFallbackId Note: - // This is a Primary Key. - ServiceFallbackId int `json:"service_fallback_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Services Supported blockchain services from the Pocket Network -type Services struct { - Active *bool `json:"active,omitempty"` - Beta *bool `json:"beta,omitempty"` - ComingSoon *bool `json:"coming_soon,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId *string `json:"network_id,omitempty"` - QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains []string `json:"service_domains"` - - // ServiceId Note: - // This is a Primary Key. - ServiceId string `json:"service_id"` - ServiceName string `json:"service_name"` - ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` - SvgIcon *string `json:"svg_icon,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Limit defines model for limit. -type Limit = string - -// Offset defines model for offset. -type Offset = string - -// Order defines model for order. -type Order = string - -// PreferCount defines model for preferCount. -type PreferCount string - -// PreferParams defines model for preferParams. -type PreferParams string - -// PreferPost defines model for preferPost. -type PreferPost string - -// PreferReturn defines model for preferReturn. -type PreferReturn string - -// Range defines model for range. -type Range = string - -// RangeUnit defines model for rangeUnit. -type RangeUnit = string - -// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. -type RowFilterApplicationsApplicationAddress = string - -// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. -type RowFilterApplicationsApplicationPrivateKeyHex = string - -// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. -type RowFilterApplicationsCreatedAt = string - -// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. -type RowFilterApplicationsGatewayAddress = string - -// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. -type RowFilterApplicationsNetworkId = string - -// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. -type RowFilterApplicationsServiceId = string - -// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. -type RowFilterApplicationsStakeAmount = string - -// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. -type RowFilterApplicationsStakeDenom = string - -// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. -type RowFilterApplicationsUpdatedAt = string - -// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. -type RowFilterGatewaysCreatedAt = string - -// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. -type RowFilterGatewaysGatewayAddress = string - -// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. -type RowFilterGatewaysGatewayPrivateKeyHex = string - -// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. -type RowFilterGatewaysNetworkId = string - -// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. -type RowFilterGatewaysStakeAmount = string - -// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. -type RowFilterGatewaysStakeDenom = string - -// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. -type RowFilterGatewaysUpdatedAt = string - -// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. -type RowFilterNetworksNetworkId = string - -// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. -type RowFilterOrganizationsCreatedAt = string - -// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. -type RowFilterOrganizationsDeletedAt = string - -// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. -type RowFilterOrganizationsOrganizationId = string - -// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. -type RowFilterOrganizationsOrganizationName = string - -// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. -type RowFilterOrganizationsUpdatedAt = string - -// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. -type RowFilterPortalAccountsBillingType = string - -// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. -type RowFilterPortalAccountsCreatedAt = string - -// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. -type RowFilterPortalAccountsDeletedAt = string - -// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. -type RowFilterPortalAccountsGcpAccountId = string - -// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. -type RowFilterPortalAccountsGcpEntitlementId = string - -// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. -type RowFilterPortalAccountsInternalAccountName = string - -// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. -type RowFilterPortalAccountsOrganizationId = string - -// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. -type RowFilterPortalAccountsPortalAccountId = string - -// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. -type RowFilterPortalAccountsPortalAccountUserLimit = string - -// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. -type RowFilterPortalAccountsPortalAccountUserLimitInterval = string - -// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. -type RowFilterPortalAccountsPortalAccountUserLimitRps = string - -// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. -type RowFilterPortalAccountsPortalPlanType = string - -// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. -type RowFilterPortalAccountsStripeSubscriptionId = string - -// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. -type RowFilterPortalAccountsUpdatedAt = string - -// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. -type RowFilterPortalAccountsUserAccountName = string - -// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. -type RowFilterPortalApplicationsCreatedAt = string - -// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. -type RowFilterPortalApplicationsDeletedAt = string - -// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. -type RowFilterPortalApplicationsEmoji = string - -// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. -type RowFilterPortalApplicationsFavoriteServiceIds = string - -// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. -type RowFilterPortalApplicationsPortalAccountId = string - -// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. -type RowFilterPortalApplicationsPortalApplicationDescription = string - -// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. -type RowFilterPortalApplicationsPortalApplicationId = string - -// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. -type RowFilterPortalApplicationsPortalApplicationName = string - -// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. -type RowFilterPortalApplicationsPortalApplicationUserLimit = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. -type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. -type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string - -// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. -type RowFilterPortalApplicationsSecretKeyHash = string - -// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. -type RowFilterPortalApplicationsSecretKeyRequired = string - -// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. -type RowFilterPortalApplicationsUpdatedAt = string - -// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. -type RowFilterPortalPlansPlanApplicationLimit = string - -// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. -type RowFilterPortalPlansPlanRateLimitRps = string - -// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. -type RowFilterPortalPlansPlanUsageLimit = string - -// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. -type RowFilterPortalPlansPlanUsageLimitInterval = string - -// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. -type RowFilterPortalPlansPortalPlanType = string - -// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. -type RowFilterPortalPlansPortalPlanTypeDescription = string - -// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. -type RowFilterServiceEndpointsCreatedAt = string - -// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. -type RowFilterServiceEndpointsEndpointId = string - -// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. -type RowFilterServiceEndpointsEndpointType = string - -// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. -type RowFilterServiceEndpointsServiceId = string - -// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. -type RowFilterServiceEndpointsUpdatedAt = string - -// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. -type RowFilterServiceFallbacksCreatedAt = string - -// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. -type RowFilterServiceFallbacksFallbackUrl = string - -// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. -type RowFilterServiceFallbacksServiceFallbackId = string - -// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. -type RowFilterServiceFallbacksServiceId = string - -// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. -type RowFilterServiceFallbacksUpdatedAt = string - -// RowFilterServicesActive defines model for rowFilter.services.active. -type RowFilterServicesActive = string - -// RowFilterServicesBeta defines model for rowFilter.services.beta. -type RowFilterServicesBeta = string - -// RowFilterServicesComingSoon defines model for rowFilter.services.coming_soon. -type RowFilterServicesComingSoon = string - -// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. -type RowFilterServicesComputeUnitsPerRelay = string - -// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. -type RowFilterServicesCreatedAt = string - -// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. -type RowFilterServicesDeletedAt = string - -// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. -type RowFilterServicesHardFallbackEnabled = string - -// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. -type RowFilterServicesNetworkId = string - -// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. -type RowFilterServicesQualityFallbackEnabled = string - -// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. -type RowFilterServicesServiceDomains = string - -// RowFilterServicesServiceId defines model for rowFilter.services.service_id. -type RowFilterServicesServiceId = string - -// RowFilterServicesServiceName defines model for rowFilter.services.service_name. -type RowFilterServicesServiceName = string - -// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. -type RowFilterServicesServiceOwnerAddress = string - -// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. -type RowFilterServicesSvgIcon = string - -// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. -type RowFilterServicesUpdatedAt = string - -// Select defines model for select. -type Select = string - -// DeleteApplicationsParams defines parameters for DeleteApplications. -type DeleteApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. -type DeleteApplicationsParamsPrefer string - -// GetApplicationsParams defines parameters for GetApplications. -type GetApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetApplicationsParamsPrefer defines parameters for GetApplications. -type GetApplicationsParamsPrefer string - -// PatchApplicationsParams defines parameters for PatchApplications. -type PatchApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchApplicationsParamsPrefer defines parameters for PatchApplications. -type PatchApplicationsParamsPrefer string - -// PostApplicationsParams defines parameters for PostApplications. -type PostApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostApplicationsParamsPrefer defines parameters for PostApplications. -type PostApplicationsParamsPrefer string - -// DeleteGatewaysParams defines parameters for DeleteGateways. -type DeleteGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. -type DeleteGatewaysParamsPrefer string - -// GetGatewaysParams defines parameters for GetGateways. -type GetGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// GetGatewaysParamsPrefer defines parameters for GetGateways. -type GetGatewaysParamsPrefer string - -// PatchGatewaysParams defines parameters for PatchGateways. -type PatchGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchGatewaysParamsPrefer defines parameters for PatchGateways. -type PatchGatewaysParamsPrefer string - -// PostGatewaysParams defines parameters for PostGateways. -type PostGatewaysParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// PostGatewaysParamsPrefer defines parameters for PostGateways. -type PostGatewaysParamsPrefer string - -// DeleteNetworksParams defines parameters for DeleteNetworks. -type DeleteNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. -type DeleteNetworksParamsPrefer string - -// GetNetworksParams defines parameters for GetNetworks. -type GetNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetNetworksParamsPrefer defines parameters for GetNetworks. -type GetNetworksParamsPrefer string - -// PatchNetworksParams defines parameters for PatchNetworks. -type PatchNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchNetworksParamsPrefer defines parameters for PatchNetworks. -type PatchNetworksParamsPrefer string - -// PostNetworksParams defines parameters for PostNetworks. -type PostNetworksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostNetworksParamsPrefer defines parameters for PostNetworks. -type PostNetworksParamsPrefer string - -// DeleteOrganizationsParams defines parameters for DeleteOrganizations. -type DeleteOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. -type DeleteOrganizationsParamsPrefer string - -// GetOrganizationsParams defines parameters for GetOrganizations. -type GetOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. -type GetOrganizationsParamsPrefer string - -// PatchOrganizationsParams defines parameters for PatchOrganizations. -type PatchOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. -type PatchOrganizationsParamsPrefer string - -// PostOrganizationsParams defines parameters for PostOrganizations. -type PostOrganizationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. -type PostOrganizationsParamsPrefer string - -// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParamsPrefer string - -// GetPortalAccountsParams defines parameters for GetPortalAccounts. -type GetPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. -type GetPortalAccountsParamsPrefer string - -// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParamsPrefer string - -// PostPortalAccountsParams defines parameters for PostPortalAccounts. -type PostPortalAccountsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. -type PostPortalAccountsParamsPrefer string - -// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParamsPrefer string - -// GetPortalApplicationsParams defines parameters for GetPortalApplications. -type GetPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. -type GetPortalApplicationsParamsPrefer string - -// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParamsPrefer string - -// PostPortalApplicationsParams defines parameters for PostPortalApplications. -type PostPortalApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. -type PostPortalApplicationsParamsPrefer string - -// DeletePortalPlansParams defines parameters for DeletePortalPlans. -type DeletePortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Prefer Preference - Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. -type DeletePortalPlansParamsPrefer string - -// GetPortalPlansParams defines parameters for GetPortalPlans. -type GetPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. -type GetPortalPlansParamsPrefer string - -// PatchPortalPlansParams defines parameters for PatchPortalPlans. -type PatchPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Prefer Preference - Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. -type PatchPortalPlansParamsPrefer string - -// PostPortalPlansParams defines parameters for PostPortalPlans. -type PostPortalPlansParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. -type PostPortalPlansParamsPrefer string - -// GetRpcCreatePortalApplicationParams defines parameters for GetRpcCreatePortalApplication. -type GetRpcCreatePortalApplicationParams struct { - PPortalAccountId string `form:"p_portal_account_id" json:"p_portal_account_id"` - PPortalUserId string `form:"p_portal_user_id" json:"p_portal_user_id"` - PPortalApplicationName *string `form:"p_portal_application_name,omitempty" json:"p_portal_application_name,omitempty"` - PEmoji *string `form:"p_emoji,omitempty" json:"p_emoji,omitempty"` - PPortalApplicationUserLimit *int `form:"p_portal_application_user_limit,omitempty" json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `form:"p_portal_application_user_limit_interval,omitempty" json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `form:"p_portal_application_user_limit_rps,omitempty" json:"p_portal_application_user_limit_rps,omitempty"` - PPortalApplicationDescription *string `form:"p_portal_application_description,omitempty" json:"p_portal_application_description,omitempty"` - PFavoriteServiceIds *string `form:"p_favorite_service_ids,omitempty" json:"p_favorite_service_ids,omitempty"` - PSecretKeyRequired *string `form:"p_secret_key_required,omitempty" json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationJSONBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationJSONBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationParams defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationParams struct { - // Prefer Preference - Prefer *PostRpcCreatePortalApplicationParamsPrefer `json:"Prefer,omitempty"` -} - -// PostRpcCreatePortalApplicationParamsPrefer defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationParamsPrefer string - -// PostRpcMeJSONBody defines parameters for PostRpcMe. -type PostRpcMeJSONBody = map[string]interface{} - -// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} - -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} - -// PostRpcMeParams defines parameters for PostRpcMe. -type PostRpcMeParams struct { - // Prefer Preference - Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` -} - -// PostRpcMeParamsPrefer defines parameters for PostRpcMe. -type PostRpcMeParamsPrefer string - -// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParamsPrefer string - -// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParamsPrefer string - -// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParamsPrefer string - -// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParamsPrefer string - -// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParamsPrefer string - -// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParamsPrefer string - -// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParamsPrefer string - -// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParamsPrefer string - -// DeleteServicesParams defines parameters for DeleteServices. -type DeleteServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServicesParamsPrefer defines parameters for DeleteServices. -type DeleteServicesParamsPrefer string - -// GetServicesParams defines parameters for GetServices. -type GetServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServicesParamsPrefer defines parameters for GetServices. -type GetServicesParamsPrefer string - -// PatchServicesParams defines parameters for PatchServices. -type PatchServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServicesParamsPrefer defines parameters for PatchServices. -type PatchServicesParamsPrefer string - -// PostServicesParams defines parameters for PostServices. -type PostServicesParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServicesParamsPrefer defines parameters for PostServices. -type PostServicesParamsPrefer string - -// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. -type PatchApplicationsJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. -type PostApplicationsJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. -type PatchGatewaysJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - -// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. -type PostGatewaysJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - -// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. -type PatchNetworksJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. -type PostNetworksJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. -type PatchOrganizationsJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. -type PostOrganizationsJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. -type PatchPortalAccountsJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. -type PostPortalAccountsJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. -type PatchPortalApplicationsJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. -type PostPortalApplicationsJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. -type PatchPortalPlansJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - -// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. -type PostPortalPlansJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - -// PostRpcCreatePortalApplicationJSONRequestBody defines body for PostRpcCreatePortalApplication for application/json ContentType. -type PostRpcCreatePortalApplicationJSONRequestBody PostRpcCreatePortalApplicationJSONBody - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json ContentType. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody - -// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. -type PostRpcMeJSONRequestBody = PostRpcMeJSONBody - -// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody - -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody - -// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. -type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. -type PostServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. -type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. -type PostServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. -type PatchServicesJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services - -// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. -type PostServicesJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore deleted file mode 100644 index 149b57654..000000000 --- a/portal-db/sdk/typescript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore deleted file mode 100644 index 42061c01a..000000000 --- a/portal-db/sdk/typescript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore deleted file mode 100644 index 884649821..000000000 --- a/portal-db/sdk/typescript/.openapi-generator-ignore +++ /dev/null @@ -1,26 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -# Ignore README.md to preserve custom documentation -README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES deleted file mode 100644 index 69e5bde07..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ /dev/null @@ -1,32 +0,0 @@ -.gitignore -.npmignore -package.json -src/apis/ApplicationsApi.ts -src/apis/GatewaysApi.ts -src/apis/IntrospectionApi.ts -src/apis/NetworksApi.ts -src/apis/OrganizationsApi.ts -src/apis/PortalAccountsApi.ts -src/apis/PortalApplicationsApi.ts -src/apis/PortalPlansApi.ts -src/apis/RpcCreatePortalApplicationApi.ts -src/apis/RpcMeApi.ts -src/apis/ServiceEndpointsApi.ts -src/apis/ServiceFallbacksApi.ts -src/apis/ServicesApi.ts -src/apis/index.ts -src/index.ts -src/models/Applications.ts -src/models/Gateways.ts -src/models/Networks.ts -src/models/Organizations.ts -src/models/PortalAccounts.ts -src/models/PortalApplications.ts -src/models/PortalPlans.ts -src/models/RpcCreatePortalApplicationPostRequest.ts -src/models/ServiceEndpoints.ts -src/models/ServiceFallbacks.ts -src/models/Services.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION deleted file mode 100644 index e465da431..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md deleted file mode 100644 index b95617b40..000000000 --- a/portal-db/sdk/typescript/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# TypeScript SDK for Portal DB - -Auto-generated TypeScript client for the Portal Database API. - -## Installation - -```bash -npm install @grove/portal-db-sdk -``` - -> **TODO**: Publish this package to npm registry - -## Quick Start - -Built-in client methods (auto-generated): - -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; - -// Create client -const config = new Configuration({ - basePath: "http://localhost:3000" -}); -const client = new PortalApplicationsApi(config); - -// Use built-in methods - no manual paths needed! -const applications = await client.portalApplicationsGet(); -``` - -React integration: - -```typescript -import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; -import { useState, useEffect } from "react"; - -const config = new Configuration({ basePath: "http://localhost:3000" }); -const portalAppsClient = new PortalApplicationsApi(config); -const createAppClient = new RpcCreatePortalApplicationApi(config); - -function PortalApplicationsList() { - const [applications, setApplications] = useState([]); - const [loading, setLoading] = useState(true); - - useEffect(() => { - portalAppsClient.portalApplicationsGet().then((apps) => { - setApplications(apps); - setLoading(false); - }); - }, []); - - const createApp = async () => { - await createAppClient.rpcCreatePortalApplicationPost({ - rpcCreatePortalApplicationPostRequest: { - pPortalAccountId: "account-123", - pPortalUserId: "user-456", - pPortalApplicationName: "My App", - pEmoji: "๐Ÿš€" - } - }); - // Refresh list - const apps = await portalAppsClient.portalApplicationsGet(); - setApplications(apps); - }; - - if (loading) return "Loading..."; - - return ( -
- -
    - {applications.map(app => ( -
  • - {app.emoji} {app.portalApplicationName} -
  • - ))} -
-
- ); -} -``` - -## Authentication - -Add JWT tokens to your requests: - -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; - -// With JWT auth -const config = new Configuration({ - basePath: "http://localhost:3000", - accessToken: jwtToken -}); - -const client = new PortalApplicationsApi(config); -``` diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json deleted file mode 100644 index 2cbb1e8a2..000000000 --- a/portal-db/sdk/typescript/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@grove/portal-db-sdk", - "version": "12.0.2 (a4e00ff)", - "description": "OpenAPI client for @grove/portal-db-sdk", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^4.0 || ^5.0" - } -} From 2cace06cf8ad97404690e443e13ec2c106a8e105 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 1 Oct 2025 18:49:59 -0700 Subject: [PATCH 28/43] Revert "Delete all sdk gen code" This reverts commit e2e1615c7031d54b103037dfa0257870fd3501e2. --- README.md | 2 + portal-db/api/README.md | 82 + portal-db/api/codegen/codegen-client.yaml | 10 + portal-db/api/codegen/codegen-models.yaml | 9 + portal-db/api/codegen/generate-sdks.sh | 429 + portal-db/sdk/go/README.md | 201 + portal-db/sdk/go/client.go | 13038 ++++++++++++++++ portal-db/sdk/go/go.mod | 25 + portal-db/sdk/go/go.sum | 54 + portal-db/sdk/go/models.go | 2033 +++ portal-db/sdk/typescript/.gitignore | 4 + portal-db/sdk/typescript/.npmignore | 1 + .../sdk/typescript/.openapi-generator-ignore | 26 + .../sdk/typescript/.openapi-generator/FILES | 32 + .../sdk/typescript/.openapi-generator/VERSION | 1 + portal-db/sdk/typescript/README.md | 96 + portal-db/sdk/typescript/package.json | 19 + 17 files changed, 16062 insertions(+) create mode 100644 portal-db/api/codegen/codegen-client.yaml create mode 100644 portal-db/api/codegen/codegen-models.yaml create mode 100755 portal-db/api/codegen/generate-sdks.sh create mode 100644 portal-db/sdk/go/README.md create mode 100644 portal-db/sdk/go/client.go create mode 100644 portal-db/sdk/go/go.mod create mode 100644 portal-db/sdk/go/go.sum create mode 100644 portal-db/sdk/go/models.go create mode 100644 portal-db/sdk/typescript/.gitignore create mode 100644 portal-db/sdk/typescript/.npmignore create mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore create mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES create mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION create mode 100644 portal-db/sdk/typescript/README.md create mode 100644 portal-db/sdk/typescript/package.json diff --git a/README.md b/README.md index e13a23289..7345b5e57 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ See the following docs for more information: - [portal-db](./portal-db/README.md) - [portal-db/api](./portal-db/api/README.md) +- [portal-db/sdk/go](./portal-db/sdk/go/README.md) +- [portal-db/sdk/typescript](./portal-db/sdk/typescript/README.md) --- diff --git a/portal-db/api/README.md b/portal-db/api/README.md index 742358c10..d30d4d334 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -38,6 +38,24 @@ curl http://localhost:3000/networks curl http://localhost:3000/ | jq ``` +### 4. Generate Go SDK + +**๐Ÿ’ก TODO_NEXT(@commoddity): Add Typescript SDK Generation to the Portal DB / PostgREST folder** + +```bash +# Generate OpenAPI spec and Go client +make generate-all +``` + +### 5. Use the Go SDK + +```go +import "github.com/grove/path/portal-db/sdk/go" + +client, _ := portaldb.NewClientWithResponses("http://localhost:3000") +networks, _ := client.GetNetworksWithResponse(context.Background(), nil) +``` + # Table of Contents - [Portal Database API](#portal-database-api) @@ -57,6 +75,7 @@ curl http://localhost:3000/ | jq - [๐Ÿ› ๏ธ Go SDK Generation](#๏ธ-go-sdk-generation) - [Generate SDK](#generate-sdk) - [Generated Files](#generated-files) + - [Use the Go SDK](#use-the-go-sdk) - [๐Ÿ”ง Development](#-development) - [Available Commands](#available-commands) - [After Database Schema Changes](#after-database-schema-changes) @@ -266,10 +285,73 @@ make generate-all # Or generate individually make generate-openapi # OpenAPI specification only +make generate-sdks # Go SDK only ``` ### Generated Files +``` +sdk/go/ +โ”œโ”€โ”€ models.go # Data types and structures (generated) +โ”œโ”€โ”€ client.go # API client and methods (generated) +โ”œโ”€โ”€ go.mod # Go module definition (permanent) +โ””โ”€โ”€ README.md # SDK documentation (permanent) +``` + +### Use the Go SDK + +**Basic Usage:** + +```go +package main + +import ( + "context" + portaldb "github.com/grove/path/portal-db/sdk/go" +) + +func main() { + // Create client + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + panic(err) + } + + // Get all networks + networks, err := client.GetNetworksWithResponse(context.Background(), nil) + if err != nil { + panic(err) + } + + // Print results + for _, network := range *networks.JSON200 { + fmt.Printf("Network: %s\n", network.NetworkId) + } +} +``` + +**With Authentication:** + +```go +// JWT token from gen-jwt.sh +token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + +// Request editor to add auth header +requestEditor := func(ctx context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil +} + +// Make authenticated request +accounts, err := client.GetPortalAccountsWithResponse( + context.Background(), + &portaldb.GetPortalAccountsParams{}, + requestEditor, +) +``` + +For complete Go SDK documentation, see [`sdk/go/README.md`](../sdk/go/README.md). + ## ๐Ÿ”ง Development ### Available Commands diff --git a/portal-db/api/codegen/codegen-client.yaml b/portal-db/api/codegen/codegen-client.yaml new file mode 100644 index 000000000..1935e80fa --- /dev/null +++ b/portal-db/api/codegen/codegen-client.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json +package: portaldb +output: ../../sdk/go/client.go +generate: + client: true + models: false + embedded-spec: true +output-options: + skip-fmt: false + skip-prune: false diff --git a/portal-db/api/codegen/codegen-models.yaml b/portal-db/api/codegen/codegen-models.yaml new file mode 100644 index 000000000..b540a8fb0 --- /dev/null +++ b/portal-db/api/codegen/codegen-models.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json +package: portaldb +output: ../../sdk/go/models.go +generate: + models: true + embedded-spec: false +output-options: + skip-fmt: false + skip-prune: false diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh new file mode 100755 index 000000000..d5c6966df --- /dev/null +++ b/portal-db/api/codegen/generate-sdks.sh @@ -0,0 +1,429 @@ +#!/bin/bash + +# Generate Go and TypeScript SDKs from OpenAPI specification +# This script generates both Go and TypeScript SDKs for the Portal DB API +# - Go SDK: Uses oapi-codegen for client and models generation +# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation + +set -e + +# Configuration +OPENAPI_DIR="../openapi" +OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" +OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" +GO_OUTPUT_DIR="../../sdk/go" +TS_OUTPUT_DIR="../../sdk/typescript" +CONFIG_MODELS="./codegen-models.yaml" +CONFIG_CLIENT="./codegen-client.yaml" +POSTGREST_URL="http://localhost:3000" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." + +# ============================================================================ +# PHASE 1: ENVIRONMENT VALIDATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 1: Environment Validation${NC}" + +# Check if Go is installed +if ! command -v go >/dev/null 2>&1; then + echo -e "${RED}โŒ Go is not installed. Please install Go first.${NC}" + echo " - Mac: brew install go" + echo " - Or download from: https://golang.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Go is installed: $(go version)${NC}" + +# Check if oapi-codegen is installed +if ! command -v oapi-codegen >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing oapi-codegen..." + go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest + + # Verify installation + if ! command -v oapi-codegen >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install oapi-codegen. Please check your Go installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" + +# Check if Node.js and npm are installed for TypeScript SDK generation +if ! command -v node >/dev/null 2>&1; then + echo -e "${RED}โŒ Node.js is not installed. Please install Node.js first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Node.js is installed: $(node --version)${NC}" + +if ! command -v npm >/dev/null 2>&1; then + echo -e "${RED}โŒ npm is not installed. Please install npm first.${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" + +# Check if Java is installed +if ! command -v java >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" + echo " Install Java: brew install openjdk" + exit 1 +fi + +# Verify Java is working properly +if ! java -version >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" + echo " Fix Java installation: brew install openjdk" + echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" + exit 1 +fi + +JAVA_VERSION=$(java -version 2>&1 | head -n1) +echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" + +# Check if openapi-generator-cli is installed +if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing openapi-generator-cli..." + npm install -g @openapitools/openapi-generator-cli + + # Verify installation + if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" + +# Check if PostgREST is running +echo "๐ŸŒ Checking PostgREST availability..." +if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then + echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" + echo " Please ensure PostgREST is running:" + echo " cd .. && docker compose up -d" + echo " cd api && docker compose up -d" + exit 1 +fi + +echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" + +# Check if configuration files exist +for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do + if [ ! -f "$config_file" ]; then + echo -e "${RED}โŒ Configuration file not found: $config_file${NC}" + echo " This should have been created as a permanent file." + exit 1 + fi +done + +echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" + +# ============================================================================ +# PHASE 2: SPEC RETRIEVAL & CONVERSION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" + +# Create openapi directory if it doesn't exist +mkdir -p "$OPENAPI_DIR" + +# Clean any existing files to start fresh +echo "๐Ÿงน Cleaning previous OpenAPI files..." +rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" + +# Generate JWT token for authenticated access to get all endpoints +echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." +JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) + +if [ -z "$JWT_TOKEN" ]; then + echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." + AUTH_HEADER="" +else + echo "โœ… JWT token generated, will fetch all endpoints (public + protected)" + AUTH_HEADER="Authorization: Bearer $JWT_TOKEN" +fi + +# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) +echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." +if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then + echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" + exit 1 +fi + +# Verify the file was created and has content +if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then + echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" + +# Convert Swagger 2.0 to OpenAPI 3.x +echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." + +# Check if swagger2openapi is available +if ! command -v swagger2openapi >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing swagger2openapi converter..." + if command -v npm >/dev/null 2>&1; then + npm install -g swagger2openapi + else + echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 + fi +fi + +if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" + exit 1 +fi + +# Fix boolean format issues in the converted spec (in place) +echo "๐Ÿ”ง Fixing boolean format issues..." +sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" +rm -f "${OPENAPI_V3_FILE}.bak" + +# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version +echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." +rm -f "$OPENAPI_V2_FILE" + +echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" + +# ============================================================================ +# PHASE 3: SDK GENERATION +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 3: SDK Generation${NC}" + +echo "๐Ÿน Generating Go SDK in separate files for better readability..." + +# Clean previous generated files +echo "๐Ÿงน Cleaning previous generated files..." +rm -f "$GO_OUTPUT_DIR/models.go" "$GO_OUTPUT_DIR/client.go" + +# Generate models file (data types and structures) +echo " Generating models.go..." +if ! oapi-codegen -config "$CONFIG_MODELS" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate models${NC}" + exit 1 +fi + +# Generate client file (API client and methods) +echo " Generating client.go..." +if ! oapi-codegen -config "$CONFIG_CLIENT" "$OPENAPI_V3_FILE"; then + echo -e "${RED}โŒ Failed to generate client${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" + +echo "" +echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." + +# Create TypeScript output directory if it doesn't exist +mkdir -p "$TS_OUTPUT_DIR" + +# Clean previous generated TypeScript files (keep permanent files) +echo "๐Ÿงน Cleaning previous TypeScript generated files..." +rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" + +# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) +echo " Generating TypeScript client with built-in methods..." +if ! openapi-generator-cli generate \ + -i "$OPENAPI_V3_FILE" \ + -g typescript-fetch \ + -o "$TS_OUTPUT_DIR" \ + --skip-validate-spec \ + --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then + echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" + exit 1 +fi + + +echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" + +# ============================================================================ +# PHASE 4: MODULE SETUP +# ============================================================================ + +echo "" +echo -e "${BLUE}๐Ÿ“‹ Phase 4: Module Setup${NC}" + +# Navigate to SDK directory for module setup +cd "$GO_OUTPUT_DIR" + +# Run go mod tidy to resolve dependencies +echo "๐Ÿ”ง Resolving dependencies..." +if ! go mod tidy; then + echo -e "${RED}โŒ Failed to resolve Go dependencies${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Go dependencies resolved${NC}" + +# Test compilation +echo "๐Ÿ” Validating generated code compilation..." +if ! go build ./...; then + echo -e "${RED}โŒ Generated code does not compile${NC}" + cd - >/dev/null + exit 1 +fi + +echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" + +# Return to scripts directory +cd - >/dev/null + +# TypeScript module setup +echo "" +echo "๐Ÿ”ท Setting up TypeScript module..." + +# Navigate to TypeScript SDK directory +cd "$TS_OUTPUT_DIR" + +# Create package.json if it doesn't exist +if [ ! -f "package.json" ]; then + echo "๐Ÿ“ฆ Creating package.json..." + cat > package.json << 'EOF' +{ + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "description": "TypeScript SDK for Grove Portal DB API", + "main": "index.ts", + "types": "types.d.ts", + "scripts": { + "build": "tsc", + "type-check": "tsc --noEmit" + }, + "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], + "author": "Grove Team", + "license": "MIT", + "devDependencies": { + "typescript": "^5.0.0" + }, + "peerDependencies": { + "typescript": ">=4.5.0" + } +} +EOF +fi + +# Create tsconfig.json if it doesn't exist +if [ ! -f "tsconfig.json" ]; then + echo "๐Ÿ”ง Creating tsconfig.json..." + cat > tsconfig.json << 'EOF' +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020", "DOM"], + "moduleResolution": "Bundler", + "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "outDir": "./dist" + }, + "include": ["src/**/*", "models/**/*", "apis/**/*"], + "exclude": ["node_modules", "dist"] +} +EOF +fi + +echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" + +# Test TypeScript compilation if TypeScript is available +if command -v tsc >/dev/null 2>&1; then + echo "๐Ÿ” Validating TypeScript compilation..." + if ! npx tsc --noEmit; then + echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" + echo " This may be due to missing dependencies or configuration issues" + echo " The generated types.ts file should still be usable" + else + echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" + fi +else + echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" + echo " Install TypeScript globally: npm install -g typescript" +fi + +# Return to scripts directory +cd - >/dev/null + +# ============================================================================ +# SUCCESS SUMMARY +# ============================================================================ + +echo "" +echo -e "${GREEN}๐ŸŽ‰ SDK generation completed successfully!${NC}" +echo "" +echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" +echo " API Docs: $OPENAPI_V3_FILE" +echo " Go SDK: $GO_OUTPUT_DIR" +echo " TypeScript: $TS_OUTPUT_DIR" +echo "" +echo -e "${BLUE}๐Ÿน Go SDK:${NC}" +echo " Module: github.com/grove/path/portal-db/sdk/go" +echo " Package: portaldb" +echo " Files:" +echo " โ€ข models.go - Generated data models and types (updated)" +echo " โ€ข client.go - Generated SDK client and methods (updated)" +echo " โ€ข go.mod - Go module definition (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" +echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" +echo " Package: @grove/portal-db-sdk" +echo " Runtime: Zero dependencies (uses native fetch)" +echo " Files:" +echo " โ€ข apis/ - Generated API client classes (updated)" +echo " โ€ข models/ - Generated TypeScript models (updated)" +echo " โ€ข package.json - Node.js package definition (permanent)" +echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" +echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" +echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" +echo "" +echo -e "${BLUE}๐Ÿš€ Next Steps:${NC}" +echo "" +echo -e "${BLUE}Go SDK:${NC}" +echo " 1. Review generated models: cat $GO_OUTPUT_DIR/models.go | head -50" +echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" +echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" +echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" +echo "" +echo -e "${BLUE}TypeScript SDK:${NC}" +echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" +echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" +echo " 3. Copy to your React project or publish as npm package" +echo " 4. Import client: import { DefaultApi } from './apis'" +echo " 5. Use built-in methods: await client.portalApplicationsGet()" +echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" +echo "" +echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" +echo " โ€ข Go: Full client with methods, types separated for readability" +echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" +echo " โ€ข Both SDKs update automatically when you run this script" +echo " โ€ข Run after database schema changes to stay in sync" +echo " โ€ข TypeScript SDK has zero runtime dependencies" +echo "" +echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/sdk/go/README.md b/portal-db/sdk/go/README.md new file mode 100644 index 000000000..cb30ca6fc --- /dev/null +++ b/portal-db/sdk/go/README.md @@ -0,0 +1,201 @@ +# Portal DB Go SDK + +This Go SDK provides a type-safe client for the Portal DB API, generated using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen). + +## Installation + +```bash +go get github.com/grove/path/portal-db/sdk/go +``` + +## Quick Start + +```go +package main + +import ( + "context" + "fmt" + "log" + + "github.com/grove/path/portal-db/sdk/go" +) + +func main() { + // Create a new client with typed responses + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + log.Fatal(err) + } + + ctx := context.Background() + + // Example: Get public data + resp, err := client.GetNetworksWithResponse(ctx, &portaldb.GetNetworksParams{}) + if err != nil { + log.Fatal(err) + } + + if resp.StatusCode() == 200 && resp.JSON200 != nil { + networks := *resp.JSON200 + fmt.Printf("Found %d networks\n", len(networks)) + } +} +``` + +## Authentication + +For authenticated endpoints, add your JWT token to requests: + +```go +import ( + "context" + "net/http" + + "github.com/grove/path/portal-db/sdk/go" +) + +func authenticatedExample() { + client, err := portaldb.NewClientWithResponses("http://localhost:3000") + if err != nil { + log.Fatal(err) + } + + // Add JWT token to requests + token := "your-jwt-token-here" + ctx := context.Background() + + // Use RequestEditorFn to add authentication header + requestEditor := func(ctx context.Context, req *http.Request) error { + req.Header.Set("Authorization", "Bearer "+token) + return nil + } + + // Make authenticated request + resp, err := client.GetPortalAccountsWithResponse( + ctx, + &portaldb.GetPortalAccountsParams{}, + requestEditor, + ) + if err != nil { + log.Fatal(err) + } + + if resp.StatusCode() == 200 && resp.JSON200 != nil { + accounts := *resp.JSON200 + fmt.Printf("Found %d accounts\n", len(accounts)) + } else { + fmt.Printf("Authentication failed: %d\n", resp.StatusCode()) + } +} +``` + +## Query Features + +The SDK supports PostgREST's powerful query features for filtering, selecting, and pagination: + +### Filtering and Selection + +```go +// Filter active services with specific fields +resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ + Active: func() *string { s := "eq.true"; return &s }(), + Select: func() *string { s := "service_id,service_name,active,network_id"; return &s }(), + Limit: func() *string { s := "3"; return &s }(), +}) +if err != nil { + log.Fatal(err) +} + +if resp.StatusCode() == 200 && resp.JSON200 != nil { + services := *resp.JSON200 + fmt.Printf("Found %d active services\n", len(services)) +} +``` + +### Specific Resource Lookup + +```go +// Get a specific service by ID +resp, err := client.GetServicesWithResponse(ctx, &portaldb.GetServicesParams{ + ServiceId: func() *string { s := "eq.ethereum-mainnet"; return &s }(), +}) +if err != nil { + log.Fatal(err) +} + +if resp.StatusCode() == 200 && resp.JSON200 != nil { + services := *resp.JSON200 + fmt.Printf("Found service: %s\n", (*services)[0].ServiceName) +} +``` + +## RPC Functions + +Access custom database functions via the RPC endpoint: + +```go +// Get current user info from JWT claims +resp, err := client.PostRpcMeWithResponse( + ctx, + &portaldb.PostRpcMeParams{}, + portaldb.PostRpcMeJSONRequestBody{}, + requestEditor, +) +if err != nil { + log.Fatal(err) +} + +if resp.StatusCode() == 200 { + fmt.Printf("User info: %s\n", string(resp.Body)) +} +``` + +## Error Handling + +```go +resp, err := client.GetNetworksWithResponse(ctx, &portaldb.GetNetworksParams{}) +if err != nil { + // Handle network/client errors + log.Printf("Client error: %v", err) + return +} + +switch resp.StatusCode() { +case 200: + // Success - access typed data + if resp.JSON200 != nil { + networks := *resp.JSON200 + fmt.Printf("Found %d networks\n", len(networks)) + } +case 401: + // Unauthorized + fmt.Println("Authentication required") +default: + // Other status codes + fmt.Printf("Unexpected status: %d\n", resp.StatusCode()) +} +``` + +## Development + +This SDK was generated from the OpenAPI specification served by PostgREST. + +To regenerate run the following make target while the PostgREST API is running: + +```bash +# From the portal-db directory +make generate-all +``` + +## Generated Files + +- `models.go` - Generated data models and type definitions +- `client.go` - Generated API client methods and HTTP logic +- `go.mod` - Go module definition +- `README.md` - This documentation + +## Related Documentation + +- **API Documentation**: [../../api/README.md](../../api/README.md) +- **OpenAPI Specification**: `../../api/openapi/openapi.json` diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go new file mode 100644 index 000000000..edbe4e2c0 --- /dev/null +++ b/portal-db/sdk/go/client.go @@ -0,0 +1,13038 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/oapi-codegen/runtime" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // Get request + Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApplications request + DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApplications request + GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApplicationsWithBody request with any body + PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApplicationsWithBody request with any body + PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteGateways request + DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGateways request + GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchGatewaysWithBody request with any body + PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostGatewaysWithBody request with any body + PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteNetworks request + DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNetworks request + GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchNetworksWithBody request with any body + PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostNetworksWithBody request with any body + PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOrganizations request + DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizations request + GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOrganizationsWithBody request with any body + PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationsWithBody request with any body + PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalAccounts request + DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalAccounts request + GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalAccountsWithBody request with any body + PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalAccountsWithBody request with any body + PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalApplications request + DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalApplications request + GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalApplicationsWithBody request with any body + PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalApplicationsWithBody request with any body + PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalPlans request + DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalPlans request + GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalPlansWithBody request with any body + PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalPlansWithBody request with any body + PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcCreatePortalApplication request + GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcCreatePortalApplicationWithBody request with any body + PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcMe request + GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcMeWithBody request with any body + PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceEndpoints request + DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceEndpoints request + GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceEndpointsWithBody request with any body + PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceEndpointsWithBody request with any body + PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceFallbacks request + DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceFallbacks request + GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceFallbacksWithBody request with any body + PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceFallbacksWithBody request with any body + PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServices request + DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServices request + GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServicesWithBody request with any body + PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServicesWithBody request with any body + PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteGatewaysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGatewaysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrganizationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalApplicationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalPlansRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcCreatePortalApplicationRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcMeRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetRequest generates requests for Get +func NewGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteApplicationsRequest generates requests for DeleteApplications +func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetApplicationsRequest generates requests for GetApplications +func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchApplicationsRequest calls the generic PatchApplications builder with application/json body +func NewPatchApplicationsRequest(server string, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json body +func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchApplicationsRequestWithBody generates requests for PatchApplications with any type of body +func NewPatchApplicationsRequestWithBody(server string, params *PatchApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ApplicationAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ApplicationPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostApplicationsRequest calls the generic PostApplications builder with application/json body +func NewPostApplicationsRequest(server string, params *PostApplicationsParams, body PostApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostApplications builder with application/vnd.pgrst.object+json body +func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostApplicationsRequestWithBody generates requests for PostApplications with any type of body +func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteGatewaysRequest generates requests for DeleteGateways +func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetGatewaysRequest generates requests for GetGateways +func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchGatewaysRequest calls the generic PatchGateways builder with application/json body +func NewPatchGatewaysRequest(server string, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json body +func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchGatewaysRequestWithBody generates requests for PatchGateways with any type of body +func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GatewayAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeAmount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StakeDenom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GatewayPrivateKeyHex != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostGatewaysRequest calls the generic PostGateways builder with application/json body +func NewPostGatewaysRequest(server string, params *PostGatewaysParams, body PostGatewaysJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostGateways builder with application/vnd.pgrst.object+json body +func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostGateways builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostGatewaysRequestWithBody generates requests for PostGateways with any type of body +func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteNetworksRequest generates requests for DeleteNetworks +func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetNetworksRequest generates requests for GetNetworks +func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body +func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body +func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body +func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body +func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations +func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetOrganizationsRequest generates requests for GetOrganizations +func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body +func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body +func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body +func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body +func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts +func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalAccountsRequest generates requests for GetPortalAccounts +func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body +func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body +func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body +func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body +func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications +func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalApplicationsRequest generates requests for GetPortalApplications +func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body +func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body +func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body +func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body +func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalPlansRequest generates requests for DeletePortalPlans +func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalPlansRequest generates requests for GetPortalPlans +func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body +func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body +func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body +func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body +func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcCreatePortalApplicationRequest generates requests for GetRpcCreatePortalApplication +func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreatePortalApplicationParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/create_portal_application") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_account_id", runtime.ParamLocationQuery, params.PPortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_user_id", runtime.ParamLocationQuery, params.PPortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.PPortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_name", runtime.ParamLocationQuery, *params.PPortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PEmoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_emoji", runtime.ParamLocationQuery, *params.PEmoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PPortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_description", runtime.ParamLocationQuery, *params.PPortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PFavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_favorite_service_ids", runtime.ParamLocationQuery, *params.PFavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PSecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_secret_key_required", runtime.ParamLocationQuery, *params.PSecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcCreatePortalApplicationRequest calls the generic PostRpcCreatePortalApplication builder with application/json body +func NewPostRpcCreatePortalApplicationRequest(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json body +func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcCreatePortalApplicationRequestWithBody generates requests for PostRpcCreatePortalApplication with any type of body +func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/create_portal_application") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcMeRequest generates requests for GetRpcMe +func NewGetRpcMeRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcMeRequest calls the generic PostRpcMe builder with application/json body +func NewPostRpcMeRequest(server string, params *PostRpcMeParams, body PostRpcMeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json body +func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcMeRequestWithBody generates requests for PostRpcMe with any type of body +func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints +func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints +func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body +func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body +func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body +func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body +func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks +func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks +func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body +func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body +func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body +func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body +func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServicesRequest generates requests for DeleteServices +func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServicesRequest generates requests for GetServices +func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServicesRequest calls the generic PatchServices builder with application/json body +func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body +func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServicesRequest calls the generic PostServices builder with application/json body +func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServicesRequestWithBody generates requests for PostServices with any type of body +func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) + + // DeleteApplicationsWithResponse request + DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) + + // GetApplicationsWithResponse request + GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) + + // PatchApplicationsWithBodyWithResponse request with any body + PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) + + // PostApplicationsWithBodyWithResponse request with any body + PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) + + // DeleteGatewaysWithResponse request + DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) + + // GetGatewaysWithResponse request + GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) + + // PatchGatewaysWithBodyWithResponse request with any body + PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) + + // PostGatewaysWithBodyWithResponse request with any body + PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) + + // DeleteNetworksWithResponse request + DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) + + // GetNetworksWithResponse request + GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) + + // PatchNetworksWithBodyWithResponse request with any body + PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + // PostNetworksWithBodyWithResponse request with any body + PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + // DeleteOrganizationsWithResponse request + DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) + + // GetOrganizationsWithResponse request + GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) + + // PatchOrganizationsWithBodyWithResponse request with any body + PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + // PostOrganizationsWithBodyWithResponse request with any body + PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + // DeletePortalAccountsWithResponse request + DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) + + // GetPortalAccountsWithResponse request + GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) + + // PatchPortalAccountsWithBodyWithResponse request with any body + PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + // PostPortalAccountsWithBodyWithResponse request with any body + PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + // DeletePortalApplicationsWithResponse request + DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) + + // GetPortalApplicationsWithResponse request + GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) + + // PatchPortalApplicationsWithBodyWithResponse request with any body + PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + // PostPortalApplicationsWithBodyWithResponse request with any body + PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + // DeletePortalPlansWithResponse request + DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) + + // GetPortalPlansWithResponse request + GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) + + // PatchPortalPlansWithBodyWithResponse request with any body + PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + // PostPortalPlansWithBodyWithResponse request with any body + PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + // GetRpcCreatePortalApplicationWithResponse request + GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) + + // PostRpcCreatePortalApplicationWithBodyWithResponse request with any body + PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + + // GetRpcMeWithResponse request + GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) + + // PostRpcMeWithBodyWithResponse request with any body + PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + + // DeleteServiceEndpointsWithResponse request + DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) + + // GetServiceEndpointsWithResponse request + GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) + + // PatchServiceEndpointsWithBodyWithResponse request with any body + PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + // PostServiceEndpointsWithBodyWithResponse request with any body + PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + // DeleteServiceFallbacksWithResponse request + DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) + + // GetServiceFallbacksWithResponse request + GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) + + // PatchServiceFallbacksWithBodyWithResponse request with any body + PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + // PostServiceFallbacksWithBodyWithResponse request with any body + PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + // DeleteServicesWithResponse request + DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) + + // GetServicesWithResponse request + GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) + + // PatchServicesWithBodyWithResponse request with any body + PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + // PostServicesWithBodyWithResponse request with any body + PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) +} + +type GetResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Applications + ApplicationvndPgrstObjectJSON200 *[]Applications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Applications +} + +// Status returns HTTPResponse.Status +func (r GetApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Gateways + ApplicationvndPgrstObjectJSON200 *[]Gateways + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Gateways +} + +// Status returns HTTPResponse.Status +func (r GetGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Networks + ApplicationvndPgrstObjectJSON200 *[]Networks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks +} + +// Status returns HTTPResponse.Status +func (r GetNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Organizations + ApplicationvndPgrstObjectJSON200 *[]Organizations + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts +} + +// Status returns HTTPResponse.Status +func (r GetPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications +} + +// Status returns HTTPResponse.Status +func (r GetPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans +} + +// Status returns HTTPResponse.Status +func (r GetPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcCreatePortalApplicationResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcCreatePortalApplicationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcCreatePortalApplicationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcCreatePortalApplicationResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcCreatePortalApplicationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcCreatePortalApplicationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcMeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcMeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints +} + +// Status returns HTTPResponse.Status +func (r GetServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks +} + +// Status returns HTTPResponse.Status +func (r GetServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Services + ApplicationvndPgrstObjectJSON200 *[]Services + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services +} + +// Status returns HTTPResponse.Status +func (r GetServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetResponse(rsp) +} + +// DeleteApplicationsWithResponse request returning *DeleteApplicationsResponse +func (c *ClientWithResponses) DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) { + rsp, err := c.DeleteApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApplicationsResponse(rsp) +} + +// GetApplicationsWithResponse request returning *GetApplicationsResponse +func (c *ClientWithResponses) GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) { + rsp, err := c.GetApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApplicationsResponse(rsp) +} + +// PatchApplicationsWithBodyWithResponse request with arbitrary body returning *PatchApplicationsResponse +func (c *ClientWithResponses) PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { + rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApplicationsResponse(rsp) +} + +// PostApplicationsWithBodyWithResponse request with arbitrary body returning *PostApplicationsResponse +func (c *ClientWithResponses) PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { + rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApplicationsResponse(rsp) +} + +// DeleteGatewaysWithResponse request returning *DeleteGatewaysResponse +func (c *ClientWithResponses) DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) { + rsp, err := c.DeleteGateways(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteGatewaysResponse(rsp) +} + +// GetGatewaysWithResponse request returning *GetGatewaysResponse +func (c *ClientWithResponses) GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) { + rsp, err := c.GetGateways(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGatewaysResponse(rsp) +} + +// PatchGatewaysWithBodyWithResponse request with arbitrary body returning *PatchGatewaysResponse +func (c *ClientWithResponses) PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGateways(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { + rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchGatewaysResponse(rsp) +} + +// PostGatewaysWithBodyWithResponse request with arbitrary body returning *PostGatewaysResponse +func (c *ClientWithResponses) PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGateways(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { + rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostGatewaysResponse(rsp) +} + +// DeleteNetworksWithResponse request returning *DeleteNetworksResponse +func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { + rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteNetworksResponse(rsp) +} + +// GetNetworksWithResponse request returning *GetNetworksResponse +func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { + rsp, err := c.GetNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworksResponse(rsp) +} + +// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse +func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse +func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse +func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { + rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrganizationsResponse(rsp) +} + +// GetOrganizationsWithResponse request returning *GetOrganizationsResponse +func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { + rsp, err := c.GetOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationsResponse(rsp) +} + +// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse +func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse +func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse +func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { + rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalAccountsResponse(rsp) +} + +// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse +func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { + rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalAccountsResponse(rsp) +} + +// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse +func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse +func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse +func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { + rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalApplicationsResponse(rsp) +} + +// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse +func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { + rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalApplicationsResponse(rsp) +} + +// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse +func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse +func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse +func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { + rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalPlansResponse(rsp) +} + +// GetPortalPlansWithResponse request returning *GetPortalPlansResponse +func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { + rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalPlansResponse(rsp) +} + +// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse +func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse +func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +// GetRpcCreatePortalApplicationWithResponse request returning *GetRpcCreatePortalApplicationResponse +func (c *ClientWithResponses) GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) { + rsp, err := c.GetRpcCreatePortalApplication(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcCreatePortalApplicationResponse(rsp) +} + +// PostRpcCreatePortalApplicationWithBodyWithResponse request with arbitrary body returning *PostRpcCreatePortalApplicationResponse +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplication(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { + rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcCreatePortalApplicationResponse(rsp) +} + +// GetRpcMeWithResponse request returning *GetRpcMeResponse +func (c *ClientWithResponses) GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) { + rsp, err := c.GetRpcMe(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcMeResponse(rsp) +} + +// PostRpcMeWithBodyWithResponse request with arbitrary body returning *PostRpcMeResponse +func (c *ClientWithResponses) PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMe(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { + rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcMeResponse(rsp) +} + +// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse +func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { + rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceEndpointsResponse(rsp) +} + +// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse +func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { + rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceEndpointsResponse(rsp) +} + +// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse +func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse +func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse +func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { + rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceFallbacksResponse(rsp) +} + +// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse +func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { + rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceFallbacksResponse(rsp) +} + +// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse +func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse +func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} + +// DeleteServicesWithResponse request returning *DeleteServicesResponse +func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { + rsp, err := c.DeleteServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServicesResponse(rsp) +} + +// GetServicesWithResponse request returning *GetServicesResponse +func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { + rsp, err := c.GetServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServicesResponse(rsp) +} + +// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse +func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} + +// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse +func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} + +// ParseGetResponse parses an HTTP response from a GetWithResponse call +func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteApplicationsResponse parses an HTTP response from a DeleteApplicationsWithResponse call +func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetApplicationsResponse parses an HTTP response from a GetApplicationsWithResponse call +func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Applications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchApplicationsResponse parses an HTTP response from a PatchApplicationsWithResponse call +func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostApplicationsResponse parses an HTTP response from a PostApplicationsWithResponse call +func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteGatewaysResponse parses an HTTP response from a DeleteGatewaysWithResponse call +func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetGatewaysResponse parses an HTTP response from a GetGatewaysWithResponse call +func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Gateways + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchGatewaysResponse parses an HTTP response from a PatchGatewaysWithResponse call +func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostGatewaysResponse parses an HTTP response from a PostGatewaysWithResponse call +func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostGatewaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call +func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call +func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call +func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call +func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call +func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call +func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call +func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call +func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call +func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call +func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call +func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call +func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call +func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call +func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call +func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call +func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call +func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call +func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call +func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call +func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcCreatePortalApplicationResponse parses an HTTP response from a GetRpcCreatePortalApplicationWithResponse call +func ParseGetRpcCreatePortalApplicationResponse(rsp *http.Response) (*GetRpcCreatePortalApplicationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcCreatePortalApplicationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcCreatePortalApplicationResponse parses an HTTP response from a PostRpcCreatePortalApplicationWithResponse call +func ParsePostRpcCreatePortalApplicationResponse(rsp *http.Response) (*PostRpcCreatePortalApplicationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcCreatePortalApplicationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcMeResponse parses an HTTP response from a GetRpcMeWithResponse call +func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcMeResponse parses an HTTP response from a PostRpcMeWithResponse call +func ParsePostRpcMeResponse(rsp *http.Response) (*PostRpcMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call +func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call +func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call +func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call +func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceEndpointsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call +func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call +func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call +func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call +func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServiceFallbacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call +func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call +func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call +func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call +func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/+w9XW/ctpZ/hdAukBQ7sd30A7he5CFN27vd26aGk+w+NMFcWuLMsJYohaTs+Bb+7xfU", + "JyVSEiVSGsfRSxCPDs85Is+3eMi/PD+Okpggwpl3/peXQAojxBHN/gpxhLn4T4CYT3HCcUy8c+9X8TMm", + "ewBJAC7gHhOYPdl4WDz+mCJ65208AiPknRdINh7zDyiCAhu/S8QDxikme+/+fuPFux1D1pQKLAOkaICo", + "Sul38bOA6UCdjerHnFC0Q/RVnBLNm1xkDxHxUUnhgGCOsyCRQzRoIJJG3vkfni9wviAxQd6HTSflC7F2", + "zDHpTCDYC4bJPkTP4qs/kc97mYiZ67eniKeUvKAooYghwksRKH6PMMERDOsfsnkSf7E4TAXsC7wnMUXP", + "gjQJsQ85Ys3HEaL7xtOe97vMaDyEN9QySSHZo9F61Gb1MsPSL+0ZpXdkgn3QUnuWoZJJBmgH05B75x7m", + "KBJLpmEivv0ZhxzRE5jkq4djwuQ/tjAIKGIatfghjP1r/wAxAQUMiHeAHxCQhneYAx0BmfddTCMoWPcP", + "kEKfIwpuIL3L7cuk10govoEcba/R3faAPgkiQ4y1h7hn0KcIchRsIe/iR4LQkuc4QozDKAG3mB+A+BP8", + "K9dfYy72kKNbeCevtI6VNpj76SCI38b0eouDLh4kCPfkGaI32Ec95CWIGchzeI22MCr9n5YBGUbLwhXe", + "4+zZSLoBInHUTzYHcf/iaRIMaIEE4VILCok+oh5WHGh00NTaFkM7LO0sWquwbWhdu8DdMrW8GalIt3W4", + "uYYvs9+zdYuvEWEgAw/A1Z3BQjpS/Rary6p9RfxoKl+s/DGEJKZ7SPC/ju36m2wEKEQ1G01xfRPvOMgB", + "QEWsQzolPPMxK//Vs3BtMC1DmHC0z6LoifRzYu05ew0jVBpmGbwzLW5jnEHUjqZsSUw5DLfQz/JvdnKF", + "wxCT/TYfo2elAeNkMtpcHE3z2ow0dW9BrWozsveT8o8etWpBzbI2ggYiHPMQRWiQmxbkLBwJO0FJ/Uul", + "9zqm9MCz8LW8LWxz0Py74KFpDd8R/DFFAAdipXYYUbCLaWYb88GgGNxhHVUKs0xli0zKEN1WlVsDvqQB", + "801vTWSbSdkNDEezV4/U8pmkVyH2T5IQEhnSDdM0YeP5FYPcT2n2gn0+SIGbRewEUIK2LL2qVEarRG8y", + "OCDDtTWqcJqdmYOW0Cwv9WBijUyKTGy2Cuh0Yh5EuU/HzNGjD5kZFMV/4i4+8oezrcoO3sQUc7Stq3ud", + "pkoLa8bZHx8m8Kb1sUdwlTqepEp5w2D1M9gxakluh2exCbwkb32Wqgt8Sf7MgyP9IAfe3JhD40BpYLTr", + "YMn8BQyCpu6BjqeaIZ8inpdsITuoccr/QHZAAcjhwDW6y0ITCQeAKT+IuKX302CbzmzSLRGi6GOKKer5", + "7qOC6kuwcRwiSCZwc+zASQgyy8VZlql+VddD2wuexAyFHDW1oSl1l5AjkD0HmACxOohxBhJEhSTGJOjK", + "LTXInTKeMrhH244dQL/BTzhKI5ABARiG8S0KsnXDJMuPJZPSyb1MYS7Wh21o5wDHZrPg7yGkcHpWRkRB", + "+jFOWCwDU0SCJMZHrXeqrJT/6wnBZBALoe6h3Sc2TaA+CW5DjmNm+a0GKg9H8zglKzsYhlfQv34AIlqz", + "Uv5vm9KwOwuUYJyuTs1H+xcDUZFBHaiOysvy0lrzcGxpZSfQ5/im03IUTy2iworQFeKw8/OYeOaCiB9H", + "mOy3LO52VjKII5JJytE2JZizbYLolqIQ3qnR0auYZdFcMQBkA7JsAkH/APJRmy6etTTs9eH4VuqINbuK", + "gwOkQW1oEIFXYXfapAd2IUrL796oSH9MYYj5nfEkdMK7mIfSTgZxBDHRpEf/B0McgOJx8fUNM1CM60zB", + "m1gdFTgVrhf3JzXpvjpbA2Ye8vEtQXRow60e2DFDN/st9rt9QPVcb03QJ25KaWEHzlCIfE3mnbOFyR68", + "isM0yqRbP/nZ+L49/OI983rDD3GAUbaOck1H/O3HhKN8L6D06PRPlk95jfw/Kdp5595/nNb9RKf5U3ba", + "QCrIyqhuSHCS7CnjJ3lzyX/Njfu/SRqG7EX2VTHJ7d5EUkJ8Tn12MxnF/aa1us3nm3LDqbulqBA6XoZx", + "eCcvQYPM+OmXhitTXz/blM7X3bRXCB1P+zi8k6e9QWb8tEvDlWmvn20am33czX0Tq+MFmIB88iqotMYv", + "RRuHsh4tgE3ry6y7ZWnjdbwwk9BPXhodtfGLo2JRlkcB2Wi+pLlfpBkd+GQS1otl7871mDoXreXc5Wq8", + "6xXLkc6zVCNw265RTWry4pQoulaleL7xlAqzszVRMTtemIkEJq+Ont74JdLhUdZJA7RRasbuF6vGPNNi", + "jSRgvVhNetMXS8bTuVgSULVYztdorqVZaEUsF6Jv/nPUxQBdXt86/IIUnZkSVFZsS2jsI8Yw2edVawb4", + "gcbp/pB95C9id2/jJTROEOVqEcGy/f49eU9exxydvydvD5gBzAAEFxRHkN6Bf6C7k/fp2dk3fnJ9mv0H", + "eZv+mlIEP/2KyJ4fvPPvzpSyy8Yb6Lg3xf39txrczfJ7fbrBq3eXlz+9frt9+8tvP715+/K3C/klzGtG", + "G2+wB1eZyZ9jivCeiJkEPAb/7Grn/Wcxz7trwOFViF48KSGfAD8rQ1W/lEOeOFqRZqV85PtouiXVVymB", + "6lepoSe8xbfPNW/RrBiPfAtN3Vl9ixKofosa2tlbtLqDOzt3yw9T1ZiqTdeU/tffaeg3S7DONaioh+Yb", + "6f7oOOND048u1/olca3PZylOzWnV8/QmuIAAmORvkHVLED9MA2GEs9nMjlUpCIEAcYhDptjg41ubwY7/", + "pY17T7O/lWF/JCbKTev/47YJGu1vHWvQOHJgwBrIZeZWz1SaiPRUTHCtRSU4eHoR+9eIgwhiQhDfAI4Y", + "z/6DuH/ylWILRgmoGwXUiFhrKgfmRqkFt7dYRAkkGDEQU+CnjMcRomBP4zQRMSrkwIcEXCEAOYf+AQVC", + "2S7yps2XZfFscZs55bSCSYQ03bVull3ZciKptd3xAsYm+G9HtwJqU7L66jqZ1pTSW9uq05DjZxwRSHjZ", + "W8xy7rIyVeb5i2bJbIv1npbT15Tk9kkFppP7/OwYiUtTLaZFI8oRAMav/N13HfjURn47nJ2t+FZ+e7yq", + "t0OQ3kNK1GCkAV5HJK1xT0Yaj45u/FLW9ohsKSRBHG3TFAdPhZOb1qs/Y9T5zfea9entzp8yNR0NYuVZ", + "kkEWhkUx4Qdv490hSIUtGtnAsPEGO+HHsN5odxgpnb09C6p0yuC1cLbHuQuaZ+iBt7MyM7vCjaftTHcX", + "F+o6gRUx6vOuvZXOl3KFs3BsZd9S004UfpcfEKYgviWAVp1auR9miHNM9kcPIyehqBrWjZMvnW3raj0f", + "2GSZn+eq7kirKEBK4V2PV5hiQLrPfek0IuUQxY7UY5849hLdTel2VqGzjXyMiz2G29T0lltZ7MGe8FEu", + "ebhveya33NtvbfQKc/RD28loR0NzJaE7GDJUjSt3mi+e/XUdsqDaqh4vVW36aLmnG4hDYYOaoUKe/Inp", + "HyphdDdAm8m1q5Zlc2rO+ownkVxAV8cEv7MV3zbeULuvOfIzQw3pD9e02226tKEEAgKN1EpV94EsHIK1", + "OoHnL64p7b/13RAR4j/8/NbbeH7MoljYhMuf3oi///fN76+fXV688jbe/7954228vfhDI8oDzcCP5fvl", + "sn6i1Qlez2CfNjT2M7U6P4pH4N3lr7kKlHMGbg+IgKQQskqhwA7icHnVaHcg2wYF2j7i+RVuFfnxIt/R", + "yS1/IG9IR48mmH4Uq3RgR+MoCwmKj2OvuzYnVW3Qw4Fl2ck8DNlqRzYa4LSZ2EimP4fKRGeH7vCcPo4P", + "8X0NusNzYN9R66x4M8qCzhj5tntmzUtef+vBprTAWu1NkftYB9pTj2XUG7a87C1uSZtq0AU29Cn/8PVj", + "7OuuJ4sZ34uIFfwY+2kkXX+VBRDegfOEnZ+eJgKOIsZPYro/ReT05uvnJ2enMMEnBx6F+Re2XZyJJuZh", + "cQEECSANQB7ngmJ/7ca7QZTl1AWOk+fgKfwWnZ3tdl9ln9QSRGCCvXPvm5OzkzPhQiA/ZKyfin/2+VV1", + "wqtkrP4SeOfe37Ob5yhiSUxY7mqen51pNnr9I9+bm0ZC3sUPCSIvL34BEhh4mulkUMzHV2KN4J6J1fiF", + "cBqzBPkZug8C1ala8hZWWGXxx+x3uQSevVp9498f+o3HNcjpiAu37jdTsbV32UzHJMmuBRJ5i48tmnxr", + "0HQsfTuUp2OVPOd0JFJ0MR2JZNsMkDTu5Lv/oOjftzrPA14VPQgtPbTdBF+qaEMdP9xvOu3FqomrJj4W", + "TSzOmzCAzK9SNeEru4XSFDC7P9KEfH5JrAFkXpM2tkL5xa8aI3Q2qu+piq/Nz5Foh97jm6IWItrbMeWG", + "B307lQvcSq+ViOQ23vOz7zUxLaQcw3BxT5NA7h9UX3Mhfl69zeptHnHcVx5kdNel5o2zjhRlf5CBY1Jc", + "pt3S5pjZhY7mvlq603uOWf5aU+7MhWmhKRbZc7Mnqy9z/nsJOd16dl6YOkpz9Pd12qCYYJ5095VOQ9DV", + "mDUN21RzpLvc80gp6PQmwFLOK6Huyz9XeV7leU3kjprIyafOLZLE2RG0T+B66Vskbz143Sduju1zX9a2", + "2ujVRs+Q/sjq8vAClu68Z7I6LJfz9Ezt6HzH6byKZKfZct6X7LwuIacbHt1l9QtH1LaN9OU0VvPWF08f", + "b8rWoG3JoE0+s3aRoM2OoH3Q1kvfImjrwesuaJvFBPSFbA/Kco50XvKKPDSz2x0VTJ7x5aKCnok1jgpm", + "mFURE2iOWukLDH5vgE+X8d5jB8aF0T2oso1qFsikHa0WWKbmB00sxytMOjpupxTApsT1hVSrsH0ewrYG", + "oEsGoMoh/YtEoQ6o2oeiw0xYxKNDyN0FpbMb1L4AdTWqn60HHxl1KgL9kGOA7vjeTmCXC/KHpts40p95", + "rkXUrz2Mri/uz9HLJw9MNBuDB7KM07A2Ois71MFb3cpuhU09OskKnf5AORfvqzmtbB609QEKM+GnCbND", + "3ThK0QpTx2FhVjhb5x5a42qdeWiFb6rjbeOZ6noV7Tta+mxxrmdpwtvmui9pXi31aqlXS71a6i/EUq+1", + "pyVrT5obCBepPjmha19/MmHDogI1jN5dDWqmqKSv8rRGJmtkskYma2Ty5eaQIyuKGn/w8PLQ7sKtpb1f", + "rnI7PM/GtdtZJlmu2I467aVYATe9vxoOTvTH4U5SMh1aS7s0wOl0Zycjzg9Tn4M/W99pjN7Sh5rTmexL", + "B0jImmmNX3uuvTXW9onbLhFWB3ZZI7X1uC46w3W4jle9nefOiLatNz00aDXoq0FfDfpq0L8wg74WeY9R", + "5D3GMVPOaLsr9s546JQZCXdF3+MEMwY14TWgWQOaNaBZA5ovOEOdWLN0d5LZkZzDUPn48zjrzGw5jMvI", + "x1gLqcosXVA2XF6+yICtvbb+jtdJiqlHZW2DC7Tte8vcobLzchLO1iVultjUG+WWrsGNvxivJeq5QA9X", + "1lZZXmV5LT88iPJDrrIL1x0siDorOHTzYF9p6MLtsMTg0FYPFw5We73a6xmzq0pdHkjwMpQsTVOHxbOk", + "rmk1T4+czalIemjin+Y51lbNjKQrnzRXqUGOGEgZoiBC0RWi7IATUNxOXCRo4ArtYoryLA7H5AS8J7lo", + "shxMulO7OMFNOuVNQOwREcvduI77pLg+bZcSPz8YjgH0KYkZCsANhqC+VwsycPH7m7dg4DU3akh8mfj5", + "9CuZuCpiWEzJxxTRO2/j5XeteclWrZLKt4txmqKN5Mh671BTrikboJnV9JYkqNRt3VPKC7mLvIFU2dXS", + "675ociIZ+TJtDb2B+7anEhUeas73k02G+3XT1oHNyGS3ORoT0lVytXT0lxZ25Q0Dd+PlxocBWJW8JFOZ", + "Vb1gGALIWOzjzDxe/vDyFUCEU4yEDQUQMEz2IQKQxxH2AaeQMOjnVljyCU9p4n8Fum2j7Hq/KCcgEIzx", + "Ambhg/iB6QII4zxSFyPMJSfvyaNb5OadyKVfGWmWNl0GaNjumN8iqwshJvA5YJndYDS6YdYMleR9zZzS", + "xty9jvCqGyP/OZrDMjSbMFc6R2Tgf5p32urjUoU9zXW2o2tPq6FaDdVqqFZD9QANVW+9erVbq91a7dZq", + "t5a3W/pvXKs9Wu3Rao9We7S0Pbpvfz64/9wrmeUHr1x0u3ZDXSb+b8gb8a5NBiI08LmyxH+k+qF1Xu86", + "3jb1g07lU7NmQjpK045IkMTY6HTYN/mQn6oR03dkKNRPyv+NbrJQUU29GbyHqfEbRVRkU/ehq5iO2Cdd", + "fZIvuQFiavLP8Qj6B1BwK1krVdL6dmiuQvZZCtm6eXLJzZOqSi21g9IRZfttlGaMWOylNCEwx4ZKW8Pa", + "t51yNa6PxYOP3JKnFeYHEQd0Zw/WwrrcjkeT6Z2w7dFubuUofwfD8Ar61+ZR/s/VCHsbUVFXfpms4SpK", + "e0wVUykNbXHZmooa0/GC/VIEwLvLX3PpK7hj4PaACEgoFpCVmDKwgzjUSGUtfQaR/yp4n6XgrQnAMRKA", + "WrOWTgAsKbtLAPoZcZAA9BFwlwDMZGwNsoHV4D4WTz8xam0I+MOLFwYzhOkCvHyG0DfXxhnCLBMtpQvm", + "WYIDm2Gt1zWC8QcpVSgEYMrRNiWYs22C6JaiMPtYbcNQEEcQE2aJJb4liG5hEFDEpuIad8m8BgH0Ob6Z", + "OrtXiMPpC4PJfsvisS21FYaPKQwxv6s9ESIiu546EQdIA1e42M1+i/3Jbzb1lKR6cu181zGTU+1F+ZUZ", + "3NE4yrbeFBfmv87FXzWBRinpauVWK7daudXKrZWQB1sJWbwAcuy6x1zljnmrHE69tkFtY/Xcq+dePffq", + "uRcuqdlW0tyayaH62WdQN7MqlzmczQwxojflPKU09M69A+fJ+elpGPswPMSMn39zdnbm3X+4/3cAAAD/", + "/5yitW57IQEA", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %w", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + res := make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + resolvePath := PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + pathToFile := url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/portal-db/sdk/go/go.mod b/portal-db/sdk/go/go.mod new file mode 100644 index 000000000..e649ced68 --- /dev/null +++ b/portal-db/sdk/go/go.mod @@ -0,0 +1,25 @@ +module github.com/grove/path/portal-db/sdk/go + +go 1.22.5 + +toolchain go1.24.3 + +require ( + github.com/getkin/kin-openapi v0.133.0 + github.com/oapi-codegen/runtime v1.1.1 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/woodsbury/decimal128 v1.3.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/portal-db/sdk/go/go.sum b/portal-db/sdk/go/go.sum new file mode 100644 index 000000000..65805ac2a --- /dev/null +++ b/portal-db/sdk/go/go.sum @@ -0,0 +1,54 @@ +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= +github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= +github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go new file mode 100644 index 000000000..80f774695 --- /dev/null +++ b/portal-db/sdk/go/models.go @@ -0,0 +1,2033 @@ +// Package portaldb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +package portaldb + +// Defines values for PortalAccountsPortalAccountUserLimitInterval. +const ( + PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" + PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" + PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" +) + +// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. +const ( + PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" + PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" + PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" +) + +// Defines values for PortalPlansPlanUsageLimitInterval. +const ( + Day PortalPlansPlanUsageLimitInterval = "day" + Month PortalPlansPlanUsageLimitInterval = "month" + Year PortalPlansPlanUsageLimitInterval = "year" +) + +// Defines values for ServiceEndpointsEndpointType. +const ( + CometBFT ServiceEndpointsEndpointType = "cometBFT" + Cosmos ServiceEndpointsEndpointType = "cosmos" + GRPC ServiceEndpointsEndpointType = "gRPC" + JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" + REST ServiceEndpointsEndpointType = "REST" + WSS ServiceEndpointsEndpointType = "WSS" +) + +// Defines values for PreferCount. +const ( + PreferCountCountNone PreferCount = "count=none" +) + +// Defines values for PreferParams. +const ( + PreferParamsParamsSingleObject PreferParams = "params=single-object" +) + +// Defines values for PreferPost. +const ( + PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" + PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" + PreferPostReturnMinimal PreferPost = "return=minimal" + PreferPostReturnNone PreferPost = "return=none" + PreferPostReturnRepresentation PreferPost = "return=representation" +) + +// Defines values for PreferReturn. +const ( + PreferReturnReturnMinimal PreferReturn = "return=minimal" + PreferReturnReturnNone PreferReturn = "return=none" + PreferReturnReturnRepresentation PreferReturn = "return=representation" +) + +// Defines values for DeleteApplicationsParamsPrefer. +const ( + DeleteApplicationsParamsPreferReturnMinimal DeleteApplicationsParamsPrefer = "return=minimal" + DeleteApplicationsParamsPreferReturnNone DeleteApplicationsParamsPrefer = "return=none" + DeleteApplicationsParamsPreferReturnRepresentation DeleteApplicationsParamsPrefer = "return=representation" +) + +// Defines values for GetApplicationsParamsPrefer. +const ( + GetApplicationsParamsPreferCountNone GetApplicationsParamsPrefer = "count=none" +) + +// Defines values for PatchApplicationsParamsPrefer. +const ( + PatchApplicationsParamsPreferReturnMinimal PatchApplicationsParamsPrefer = "return=minimal" + PatchApplicationsParamsPreferReturnNone PatchApplicationsParamsPrefer = "return=none" + PatchApplicationsParamsPreferReturnRepresentation PatchApplicationsParamsPrefer = "return=representation" +) + +// Defines values for PostApplicationsParamsPrefer. +const ( + PostApplicationsParamsPreferResolutionIgnoreDuplicates PostApplicationsParamsPrefer = "resolution=ignore-duplicates" + PostApplicationsParamsPreferResolutionMergeDuplicates PostApplicationsParamsPrefer = "resolution=merge-duplicates" + PostApplicationsParamsPreferReturnMinimal PostApplicationsParamsPrefer = "return=minimal" + PostApplicationsParamsPreferReturnNone PostApplicationsParamsPrefer = "return=none" + PostApplicationsParamsPreferReturnRepresentation PostApplicationsParamsPrefer = "return=representation" +) + +// Defines values for DeleteGatewaysParamsPrefer. +const ( + DeleteGatewaysParamsPreferReturnMinimal DeleteGatewaysParamsPrefer = "return=minimal" + DeleteGatewaysParamsPreferReturnNone DeleteGatewaysParamsPrefer = "return=none" + DeleteGatewaysParamsPreferReturnRepresentation DeleteGatewaysParamsPrefer = "return=representation" +) + +// Defines values for GetGatewaysParamsPrefer. +const ( + GetGatewaysParamsPreferCountNone GetGatewaysParamsPrefer = "count=none" +) + +// Defines values for PatchGatewaysParamsPrefer. +const ( + PatchGatewaysParamsPreferReturnMinimal PatchGatewaysParamsPrefer = "return=minimal" + PatchGatewaysParamsPreferReturnNone PatchGatewaysParamsPrefer = "return=none" + PatchGatewaysParamsPreferReturnRepresentation PatchGatewaysParamsPrefer = "return=representation" +) + +// Defines values for PostGatewaysParamsPrefer. +const ( + PostGatewaysParamsPreferResolutionIgnoreDuplicates PostGatewaysParamsPrefer = "resolution=ignore-duplicates" + PostGatewaysParamsPreferResolutionMergeDuplicates PostGatewaysParamsPrefer = "resolution=merge-duplicates" + PostGatewaysParamsPreferReturnMinimal PostGatewaysParamsPrefer = "return=minimal" + PostGatewaysParamsPreferReturnNone PostGatewaysParamsPrefer = "return=none" + PostGatewaysParamsPreferReturnRepresentation PostGatewaysParamsPrefer = "return=representation" +) + +// Defines values for DeleteNetworksParamsPrefer. +const ( + DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" + DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" + DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" +) + +// Defines values for GetNetworksParamsPrefer. +const ( + GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" +) + +// Defines values for PatchNetworksParamsPrefer. +const ( + PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" + PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" + PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" +) + +// Defines values for PostNetworksParamsPrefer. +const ( + PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" + PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" + PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" + PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" + PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" +) + +// Defines values for DeleteOrganizationsParamsPrefer. +const ( + DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" + DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" + DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for GetOrganizationsParamsPrefer. +const ( + GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" +) + +// Defines values for PatchOrganizationsParamsPrefer. +const ( + PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" + PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" + PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for PostOrganizationsParamsPrefer. +const ( + PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" + PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" + PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" + PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" + PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalAccountsParamsPrefer. +const ( + DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" + DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" + DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalAccountsParamsPrefer. +const ( + GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalAccountsParamsPrefer. +const ( + PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" + PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" + PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalAccountsParamsPrefer. +const ( + PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" + PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" + PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" + PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" + PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalApplicationsParamsPrefer. +const ( + DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" + DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" + DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalApplicationsParamsPrefer. +const ( + GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalApplicationsParamsPrefer. +const ( + PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" + PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" + PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalApplicationsParamsPrefer. +const ( + PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" + PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" + PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" + PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" + PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalPlansParamsPrefer. +const ( + DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" + DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" + DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" +) + +// Defines values for GetPortalPlansParamsPrefer. +const ( + GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" +) + +// Defines values for PatchPortalPlansParamsPrefer. +const ( + PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" + PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" + PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostPortalPlansParamsPrefer. +const ( + PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" + PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" + PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" + PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" + PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostRpcCreatePortalApplicationParamsPrefer. +const ( + PostRpcCreatePortalApplicationParamsPreferParamsSingleObject PostRpcCreatePortalApplicationParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcMeParamsPrefer. +const ( + ParamsSingleObject PostRpcMeParamsPrefer = "params=single-object" +) + +// Defines values for DeleteServiceEndpointsParamsPrefer. +const ( + DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" + DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" + DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for GetServiceEndpointsParamsPrefer. +const ( + GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" +) + +// Defines values for PatchServiceEndpointsParamsPrefer. +const ( + PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" + PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" + PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for PostServiceEndpointsParamsPrefer. +const ( + PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" + PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" + PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" + PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" + PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for DeleteServiceFallbacksParamsPrefer. +const ( + DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" + DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" + DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for GetServiceFallbacksParamsPrefer. +const ( + GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" +) + +// Defines values for PatchServiceFallbacksParamsPrefer. +const ( + PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" + PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" + PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for PostServiceFallbacksParamsPrefer. +const ( + PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" + PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" + PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" + PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" + PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for DeleteServicesParamsPrefer. +const ( + DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" + DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" + DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" +) + +// Defines values for GetServicesParamsPrefer. +const ( + CountNone GetServicesParamsPrefer = "count=none" +) + +// Defines values for PatchServicesParamsPrefer. +const ( + PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" + PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" + PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" +) + +// Defines values for PostServicesParamsPrefer. +const ( + PostServicesParamsPreferResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" + PostServicesParamsPreferResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" + PostServicesParamsPreferReturnMinimal PostServicesParamsPrefer = "return=minimal" + PostServicesParamsPreferReturnNone PostServicesParamsPrefer = "return=none" + PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" +) + +// Applications Onchain applications for processing relays through the network +type Applications struct { + // ApplicationAddress Blockchain address of the application + // + // Note: + // This is a Primary Key. + ApplicationAddress string `json:"application_address"` + ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Note: + // This is a Foreign Key to `gateways.gateway_address`. + GatewayAddress string `json:"gateway_address"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + StakeAmount *int `json:"stake_amount,omitempty"` + StakeDenom *string `json:"stake_denom,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Gateways Onchain gateway information including stake and network details +type Gateways struct { + CreatedAt *string `json:"created_at,omitempty"` + + // GatewayAddress Blockchain address of the gateway + // + // Note: + // This is a Primary Key. + GatewayAddress string `json:"gateway_address"` + GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId string `json:"network_id"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount int `json:"stake_amount"` + StakeDenom string `json:"stake_denom"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) +type Networks struct { + // NetworkId Note: + // This is a Primary Key. + NetworkId string `json:"network_id"` +} + +// Organizations Companies or customer groups that can be attached to Portal Accounts +type Organizations struct { + CreatedAt *string `json:"created_at,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *string `json:"deleted_at,omitempty"` + + // OrganizationId Note: + // This is a Primary Key. + OrganizationId int `json:"organization_id"` + + // OrganizationName Name of the organization + OrganizationName string `json:"organization_name"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalAccounts Multi-tenant accounts with plans and billing integration +type PortalAccounts struct { + BillingType *string `json:"billing_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + GcpAccountId *string `json:"gcp_account_id,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + InternalAccountName *string `json:"internal_account_name,omitempty"` + + // OrganizationId Note: + // This is a Foreign Key to `organizations.organization_id`. + OrganizationId *int `json:"organization_id,omitempty"` + + // PortalAccountId Unique identifier for the portal account + // + // Note: + // This is a Primary Key. + PortalAccountId string `json:"portal_account_id"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType string `json:"portal_plan_type"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + +// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. +type PortalAccountsPortalAccountUserLimitInterval string + +// PortalApplications Applications created within portal accounts with their own rate limits and settings +type PortalApplications struct { + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + Emoji *string `json:"emoji,omitempty"` + FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId string `json:"portal_account_id"` + PortalApplicationDescription *string `json:"portal_application_description,omitempty"` + + // PortalApplicationId Note: + // This is a Primary Key. + PortalApplicationId string `json:"portal_application_id"` + PortalApplicationName *string `json:"portal_application_name,omitempty"` + PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *string `json:"secret_key_hash,omitempty"` + SecretKeyRequired *bool `json:"secret_key_required,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. +type PortalApplicationsPortalApplicationUserLimitInterval string + +// PortalPlans Available subscription plans for Portal Accounts +type PortalPlans struct { + PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` + + // PortalPlanType Note: + // This is a Primary Key. + PortalPlanType string `json:"portal_plan_type"` + PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` +} + +// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. +type PortalPlansPlanUsageLimitInterval string + +// ServiceEndpoints Available endpoint types for each service +type ServiceEndpoints struct { + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId Note: + // This is a Primary Key. + EndpointId int `json:"endpoint_id"` + EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. +type ServiceEndpointsEndpointType string + +// ServiceFallbacks Fallback URLs for services when primary endpoints fail +type ServiceFallbacks struct { + CreatedAt *string `json:"created_at,omitempty"` + FallbackUrl string `json:"fallback_url"` + + // ServiceFallbackId Note: + // This is a Primary Key. + ServiceFallbackId int `json:"service_fallback_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Services Supported blockchain services from the Pocket Network +type Services struct { + Active *bool `json:"active,omitempty"` + Beta *bool `json:"beta,omitempty"` + ComingSoon *bool `json:"coming_soon,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId *string `json:"network_id,omitempty"` + QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains []string `json:"service_domains"` + + // ServiceId Note: + // This is a Primary Key. + ServiceId string `json:"service_id"` + ServiceName string `json:"service_name"` + ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` + SvgIcon *string `json:"svg_icon,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Limit defines model for limit. +type Limit = string + +// Offset defines model for offset. +type Offset = string + +// Order defines model for order. +type Order = string + +// PreferCount defines model for preferCount. +type PreferCount string + +// PreferParams defines model for preferParams. +type PreferParams string + +// PreferPost defines model for preferPost. +type PreferPost string + +// PreferReturn defines model for preferReturn. +type PreferReturn string + +// Range defines model for range. +type Range = string + +// RangeUnit defines model for rangeUnit. +type RangeUnit = string + +// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. +type RowFilterApplicationsApplicationAddress = string + +// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. +type RowFilterApplicationsApplicationPrivateKeyHex = string + +// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. +type RowFilterApplicationsCreatedAt = string + +// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. +type RowFilterApplicationsGatewayAddress = string + +// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. +type RowFilterApplicationsNetworkId = string + +// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. +type RowFilterApplicationsServiceId = string + +// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. +type RowFilterApplicationsStakeAmount = string + +// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. +type RowFilterApplicationsStakeDenom = string + +// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. +type RowFilterApplicationsUpdatedAt = string + +// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. +type RowFilterGatewaysCreatedAt = string + +// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. +type RowFilterGatewaysGatewayAddress = string + +// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. +type RowFilterGatewaysGatewayPrivateKeyHex = string + +// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. +type RowFilterGatewaysNetworkId = string + +// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. +type RowFilterGatewaysStakeAmount = string + +// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. +type RowFilterGatewaysStakeDenom = string + +// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. +type RowFilterGatewaysUpdatedAt = string + +// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. +type RowFilterNetworksNetworkId = string + +// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. +type RowFilterOrganizationsCreatedAt = string + +// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. +type RowFilterOrganizationsDeletedAt = string + +// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. +type RowFilterOrganizationsOrganizationId = string + +// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. +type RowFilterOrganizationsOrganizationName = string + +// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. +type RowFilterOrganizationsUpdatedAt = string + +// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. +type RowFilterPortalAccountsBillingType = string + +// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. +type RowFilterPortalAccountsCreatedAt = string + +// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. +type RowFilterPortalAccountsDeletedAt = string + +// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. +type RowFilterPortalAccountsGcpAccountId = string + +// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. +type RowFilterPortalAccountsGcpEntitlementId = string + +// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. +type RowFilterPortalAccountsInternalAccountName = string + +// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. +type RowFilterPortalAccountsOrganizationId = string + +// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. +type RowFilterPortalAccountsPortalAccountId = string + +// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. +type RowFilterPortalAccountsPortalAccountUserLimit = string + +// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. +type RowFilterPortalAccountsPortalAccountUserLimitInterval = string + +// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. +type RowFilterPortalAccountsPortalAccountUserLimitRps = string + +// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. +type RowFilterPortalAccountsPortalPlanType = string + +// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. +type RowFilterPortalAccountsStripeSubscriptionId = string + +// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. +type RowFilterPortalAccountsUpdatedAt = string + +// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. +type RowFilterPortalAccountsUserAccountName = string + +// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. +type RowFilterPortalApplicationsCreatedAt = string + +// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. +type RowFilterPortalApplicationsDeletedAt = string + +// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. +type RowFilterPortalApplicationsEmoji = string + +// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. +type RowFilterPortalApplicationsFavoriteServiceIds = string + +// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. +type RowFilterPortalApplicationsPortalAccountId = string + +// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. +type RowFilterPortalApplicationsPortalApplicationDescription = string + +// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. +type RowFilterPortalApplicationsPortalApplicationId = string + +// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. +type RowFilterPortalApplicationsPortalApplicationName = string + +// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. +type RowFilterPortalApplicationsPortalApplicationUserLimit = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. +type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. +type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string + +// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. +type RowFilterPortalApplicationsSecretKeyHash = string + +// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. +type RowFilterPortalApplicationsSecretKeyRequired = string + +// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. +type RowFilterPortalApplicationsUpdatedAt = string + +// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. +type RowFilterPortalPlansPlanApplicationLimit = string + +// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. +type RowFilterPortalPlansPlanRateLimitRps = string + +// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. +type RowFilterPortalPlansPlanUsageLimit = string + +// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. +type RowFilterPortalPlansPlanUsageLimitInterval = string + +// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. +type RowFilterPortalPlansPortalPlanType = string + +// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. +type RowFilterPortalPlansPortalPlanTypeDescription = string + +// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. +type RowFilterServiceEndpointsCreatedAt = string + +// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. +type RowFilterServiceEndpointsEndpointId = string + +// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. +type RowFilterServiceEndpointsEndpointType = string + +// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. +type RowFilterServiceEndpointsServiceId = string + +// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. +type RowFilterServiceEndpointsUpdatedAt = string + +// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. +type RowFilterServiceFallbacksCreatedAt = string + +// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. +type RowFilterServiceFallbacksFallbackUrl = string + +// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. +type RowFilterServiceFallbacksServiceFallbackId = string + +// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. +type RowFilterServiceFallbacksServiceId = string + +// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. +type RowFilterServiceFallbacksUpdatedAt = string + +// RowFilterServicesActive defines model for rowFilter.services.active. +type RowFilterServicesActive = string + +// RowFilterServicesBeta defines model for rowFilter.services.beta. +type RowFilterServicesBeta = string + +// RowFilterServicesComingSoon defines model for rowFilter.services.coming_soon. +type RowFilterServicesComingSoon = string + +// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. +type RowFilterServicesComputeUnitsPerRelay = string + +// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. +type RowFilterServicesCreatedAt = string + +// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. +type RowFilterServicesDeletedAt = string + +// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. +type RowFilterServicesHardFallbackEnabled = string + +// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. +type RowFilterServicesNetworkId = string + +// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. +type RowFilterServicesQualityFallbackEnabled = string + +// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. +type RowFilterServicesServiceDomains = string + +// RowFilterServicesServiceId defines model for rowFilter.services.service_id. +type RowFilterServicesServiceId = string + +// RowFilterServicesServiceName defines model for rowFilter.services.service_name. +type RowFilterServicesServiceName = string + +// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. +type RowFilterServicesServiceOwnerAddress = string + +// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. +type RowFilterServicesSvgIcon = string + +// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. +type RowFilterServicesUpdatedAt = string + +// Select defines model for select. +type Select = string + +// DeleteApplicationsParams defines parameters for DeleteApplications. +type DeleteApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. +type DeleteApplicationsParamsPrefer string + +// GetApplicationsParams defines parameters for GetApplications. +type GetApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetApplicationsParamsPrefer defines parameters for GetApplications. +type GetApplicationsParamsPrefer string + +// PatchApplicationsParams defines parameters for PatchApplications. +type PatchApplicationsParams struct { + // ApplicationAddress Blockchain address of the application + ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` + GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` + NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchApplicationsParamsPrefer defines parameters for PatchApplications. +type PatchApplicationsParamsPrefer string + +// PostApplicationsParams defines parameters for PostApplications. +type PostApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostApplicationsParamsPrefer defines parameters for PostApplications. +type PostApplicationsParamsPrefer string + +// DeleteGatewaysParams defines parameters for DeleteGateways. +type DeleteGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. +type DeleteGatewaysParamsPrefer string + +// GetGatewaysParams defines parameters for GetGateways. +type GetGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// GetGatewaysParamsPrefer defines parameters for GetGateways. +type GetGatewaysParamsPrefer string + +// PatchGatewaysParams defines parameters for PatchGateways. +type PatchGatewaysParams struct { + // GatewayAddress Blockchain address of the gateway + GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` + + // StakeAmount Amount of tokens staked by the gateway + StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` + StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` + NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` + CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchGatewaysParamsPrefer defines parameters for PatchGateways. +type PatchGatewaysParamsPrefer string + +// PostGatewaysParams defines parameters for PostGateways. +type PostGatewaysParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` +} + +// PostGatewaysParamsPrefer defines parameters for PostGateways. +type PostGatewaysParamsPrefer string + +// DeleteNetworksParams defines parameters for DeleteNetworks. +type DeleteNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. +type DeleteNetworksParamsPrefer string + +// GetNetworksParams defines parameters for GetNetworks. +type GetNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetNetworksParamsPrefer defines parameters for GetNetworks. +type GetNetworksParamsPrefer string + +// PatchNetworksParams defines parameters for PatchNetworks. +type PatchNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchNetworksParamsPrefer defines parameters for PatchNetworks. +type PatchNetworksParamsPrefer string + +// PostNetworksParams defines parameters for PostNetworks. +type PostNetworksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostNetworksParamsPrefer defines parameters for PostNetworks. +type PostNetworksParamsPrefer string + +// DeleteOrganizationsParams defines parameters for DeleteOrganizations. +type DeleteOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. +type DeleteOrganizationsParamsPrefer string + +// GetOrganizationsParams defines parameters for GetOrganizations. +type GetOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. +type GetOrganizationsParamsPrefer string + +// PatchOrganizationsParams defines parameters for PatchOrganizations. +type PatchOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. +type PatchOrganizationsParamsPrefer string + +// PostOrganizationsParams defines parameters for PostOrganizations. +type PostOrganizationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. +type PostOrganizationsParamsPrefer string + +// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParamsPrefer string + +// GetPortalAccountsParams defines parameters for GetPortalAccounts. +type GetPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. +type GetPortalAccountsParamsPrefer string + +// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParamsPrefer string + +// PostPortalAccountsParams defines parameters for PostPortalAccounts. +type PostPortalAccountsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. +type PostPortalAccountsParamsPrefer string + +// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParamsPrefer string + +// GetPortalApplicationsParams defines parameters for GetPortalApplications. +type GetPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. +type GetPortalApplicationsParamsPrefer string + +// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParamsPrefer string + +// PostPortalApplicationsParams defines parameters for PostPortalApplications. +type PostPortalApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. +type PostPortalApplicationsParamsPrefer string + +// DeletePortalPlansParams defines parameters for DeletePortalPlans. +type DeletePortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. +type DeletePortalPlansParamsPrefer string + +// GetPortalPlansParams defines parameters for GetPortalPlans. +type GetPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. +type GetPortalPlansParamsPrefer string + +// PatchPortalPlansParams defines parameters for PatchPortalPlans. +type PatchPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. +type PatchPortalPlansParamsPrefer string + +// PostPortalPlansParams defines parameters for PostPortalPlans. +type PostPortalPlansParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. +type PostPortalPlansParamsPrefer string + +// GetRpcCreatePortalApplicationParams defines parameters for GetRpcCreatePortalApplication. +type GetRpcCreatePortalApplicationParams struct { + PPortalAccountId string `form:"p_portal_account_id" json:"p_portal_account_id"` + PPortalUserId string `form:"p_portal_user_id" json:"p_portal_user_id"` + PPortalApplicationName *string `form:"p_portal_application_name,omitempty" json:"p_portal_application_name,omitempty"` + PEmoji *string `form:"p_emoji,omitempty" json:"p_emoji,omitempty"` + PPortalApplicationUserLimit *int `form:"p_portal_application_user_limit,omitempty" json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `form:"p_portal_application_user_limit_interval,omitempty" json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `form:"p_portal_application_user_limit_rps,omitempty" json:"p_portal_application_user_limit_rps,omitempty"` + PPortalApplicationDescription *string `form:"p_portal_application_description,omitempty" json:"p_portal_application_description,omitempty"` + PFavoriteServiceIds *string `form:"p_favorite_service_ids,omitempty" json:"p_favorite_service_ids,omitempty"` + PSecretKeyRequired *string `form:"p_secret_key_required,omitempty" json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationJSONBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationJSONBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + PEmoji *string `json:"p_emoji,omitempty"` + PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` + PPortalAccountId string `json:"p_portal_account_id"` + PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` + PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` + PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` + PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` + PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` + PPortalUserId string `json:"p_portal_user_id"` + PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` +} + +// PostRpcCreatePortalApplicationParams defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationParams struct { + // Prefer Preference + Prefer *PostRpcCreatePortalApplicationParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcCreatePortalApplicationParamsPrefer defines parameters for PostRpcCreatePortalApplication. +type PostRpcCreatePortalApplicationParamsPrefer string + +// PostRpcMeJSONBody defines parameters for PostRpcMe. +type PostRpcMeJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} + +// PostRpcMeParams defines parameters for PostRpcMe. +type PostRpcMeParams struct { + // Prefer Preference + Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcMeParamsPrefer defines parameters for PostRpcMe. +type PostRpcMeParamsPrefer string + +// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParamsPrefer string + +// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParamsPrefer string + +// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParamsPrefer string + +// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParamsPrefer string + +// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParamsPrefer string + +// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParamsPrefer string + +// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParamsPrefer string + +// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParamsPrefer string + +// DeleteServicesParams defines parameters for DeleteServices. +type DeleteServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServicesParamsPrefer defines parameters for DeleteServices. +type DeleteServicesParamsPrefer string + +// GetServicesParams defines parameters for GetServices. +type GetServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServicesParamsPrefer defines parameters for GetServices. +type GetServicesParamsPrefer string + +// PatchServicesParams defines parameters for PatchServices. +type PatchServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServicesParamsPrefer defines parameters for PatchServices. +type PatchServicesParamsPrefer string + +// PostServicesParams defines parameters for PostServices. +type PostServicesParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServicesParamsPrefer defines parameters for PostServices. +type PostServicesParamsPrefer string + +// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. +type PatchApplicationsJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. +type PostApplicationsJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications + +// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications + +// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. +type PatchGatewaysJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + +// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. +type PostGatewaysJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways + +// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways + +// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. +type PatchNetworksJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. +type PostNetworksJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. +type PatchOrganizationsJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. +type PostOrganizationsJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. +type PatchPortalAccountsJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. +type PostPortalAccountsJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. +type PatchPortalApplicationsJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. +type PostPortalApplicationsJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. +type PatchPortalPlansJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. +type PostPortalPlansJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostRpcCreatePortalApplicationJSONRequestBody defines body for PostRpcCreatePortalApplication for application/json ContentType. +type PostRpcCreatePortalApplicationJSONRequestBody PostRpcCreatePortalApplicationJSONBody + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json ContentType. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody + +// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. +type PostRpcMeJSONRequestBody = PostRpcMeJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody + +// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. +type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. +type PostServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. +type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. +type PostServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. +type PatchServicesJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services + +// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. +type PostServicesJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/portal-db/sdk/typescript/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore new file mode 100644 index 000000000..42061c01a --- /dev/null +++ b/portal-db/sdk/typescript/.npmignore @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore new file mode 100644 index 000000000..884649821 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator-ignore @@ -0,0 +1,26 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +# Ignore README.md to preserve custom documentation +README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES new file mode 100644 index 000000000..69e5bde07 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -0,0 +1,32 @@ +.gitignore +.npmignore +package.json +src/apis/ApplicationsApi.ts +src/apis/GatewaysApi.ts +src/apis/IntrospectionApi.ts +src/apis/NetworksApi.ts +src/apis/OrganizationsApi.ts +src/apis/PortalAccountsApi.ts +src/apis/PortalApplicationsApi.ts +src/apis/PortalPlansApi.ts +src/apis/RpcCreatePortalApplicationApi.ts +src/apis/RpcMeApi.ts +src/apis/ServiceEndpointsApi.ts +src/apis/ServiceFallbacksApi.ts +src/apis/ServicesApi.ts +src/apis/index.ts +src/index.ts +src/models/Applications.ts +src/models/Gateways.ts +src/models/Networks.ts +src/models/Organizations.ts +src/models/PortalAccounts.ts +src/models/PortalApplications.ts +src/models/PortalPlans.ts +src/models/RpcCreatePortalApplicationPostRequest.ts +src/models/ServiceEndpoints.ts +src/models/ServiceFallbacks.ts +src/models/Services.ts +src/models/index.ts +src/runtime.ts +tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION new file mode 100644 index 000000000..e465da431 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md new file mode 100644 index 000000000..b95617b40 --- /dev/null +++ b/portal-db/sdk/typescript/README.md @@ -0,0 +1,96 @@ +# TypeScript SDK for Portal DB + +Auto-generated TypeScript client for the Portal Database API. + +## Installation + +```bash +npm install @grove/portal-db-sdk +``` + +> **TODO**: Publish this package to npm registry + +## Quick Start + +Built-in client methods (auto-generated): + +```typescript +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; + +// Create client +const config = new Configuration({ + basePath: "http://localhost:3000" +}); +const client = new PortalApplicationsApi(config); + +// Use built-in methods - no manual paths needed! +const applications = await client.portalApplicationsGet(); +``` + +React integration: + +```typescript +import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; +import { useState, useEffect } from "react"; + +const config = new Configuration({ basePath: "http://localhost:3000" }); +const portalAppsClient = new PortalApplicationsApi(config); +const createAppClient = new RpcCreatePortalApplicationApi(config); + +function PortalApplicationsList() { + const [applications, setApplications] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + portalAppsClient.portalApplicationsGet().then((apps) => { + setApplications(apps); + setLoading(false); + }); + }, []); + + const createApp = async () => { + await createAppClient.rpcCreatePortalApplicationPost({ + rpcCreatePortalApplicationPostRequest: { + pPortalAccountId: "account-123", + pPortalUserId: "user-456", + pPortalApplicationName: "My App", + pEmoji: "๐Ÿš€" + } + }); + // Refresh list + const apps = await portalAppsClient.portalApplicationsGet(); + setApplications(apps); + }; + + if (loading) return "Loading..."; + + return ( +
+ +
    + {applications.map(app => ( +
  • + {app.emoji} {app.portalApplicationName} +
  • + ))} +
+
+ ); +} +``` + +## Authentication + +Add JWT tokens to your requests: + +```typescript +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; + +// With JWT auth +const config = new Configuration({ + basePath: "http://localhost:3000", + accessToken: jwtToken +}); + +const client = new PortalApplicationsApi(config); +``` diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json new file mode 100644 index 000000000..2cbb1e8a2 --- /dev/null +++ b/portal-db/sdk/typescript/package.json @@ -0,0 +1,19 @@ +{ + "name": "@grove/portal-db-sdk", + "version": "12.0.2 (a4e00ff)", + "description": "OpenAPI client for @grove/portal-db-sdk", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } +} From 7fd85f00365557a16cb17ca5f770ceed8b0e8ce9 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Mon, 6 Oct 2025 18:05:18 +0100 Subject: [PATCH 29/43] fix sdk gen script and add auth password sql file --- portal-db/Makefile | 5 + portal-db/api/codegen/generate-sdks.sh | 8 +- portal-db/api/openapi/openapi.json | 7387 +++++++++-------- .../003_set_authenticator_password.sql | 31 + .../api/scripts/test-portal-app-creation.sh | 181 - .../test-postgrest-portal-app-creation.sh | 206 - portal-db/docker-compose.yml | 2 + portal-db/schema/001_schema.sql | 456 - .../schema/003_postgrest_transactions.sql | 289 - portal-db/sdk/go/README.md | 6 +- portal-db/sdk/go/client.go | 5996 +++++++------ portal-db/sdk/go/go.mod | 2 +- portal-db/sdk/go/models.go | 1009 ++- .../sdk/typescript/.openapi-generator/FILES | 19 +- .../typescript/src/apis/ApplicationsApi.ts | 397 - .../sdk/typescript/src/apis/GatewaysApi.ts | 367 - .../src/apis/PortalAccountRbacApi.ts | 337 + .../src/apis/PortalApplicationRbacApi.ts | 337 + .../sdk/typescript/src/apis/RpcArmorApi.ts | 124 + .../src/apis/RpcCreatePortalApplicationApi.ts | 184 - .../sdk/typescript/src/apis/RpcDearmorApi.ts | 124 + .../{RpcMeApi.ts => RpcGenRandomUuidApi.ts} | 28 +- .../sdk/typescript/src/apis/RpcGenSaltApi.ts | 124 + .../src/apis/RpcPgpArmorHeadersApi.ts | 124 + .../sdk/typescript/src/apis/RpcPgpKeyIdApi.ts | 124 + .../sdk/typescript/src/apis/ServicesApi.ts | 45 + portal-db/sdk/typescript/src/apis/index.ts | 12 +- .../sdk/typescript/src/models/Applications.ts | 139 - .../sdk/typescript/src/models/Gateways.ts | 121 - .../src/models/PortalAccountRbac.ts | 104 + .../src/models/PortalApplicationRbac.ts | 103 + .../src/models/RpcArmorPostRequest.ts | 66 + .../RpcCreatePortalApplicationPostRequest.ts | 142 - .../src/models/RpcGenSaltPostRequest.ts | 66 + .../sdk/typescript/src/models/Services.ts | 24 + portal-db/sdk/typescript/src/models/index.ts | 7 +- 36 files changed, 9849 insertions(+), 8847 deletions(-) create mode 100644 portal-db/api/scripts/003_set_authenticator_password.sql delete mode 100755 portal-db/api/scripts/test-portal-app-creation.sh delete mode 100755 portal-db/api/scripts/test-postgrest-portal-app-creation.sh delete mode 100644 portal-db/schema/001_schema.sql delete mode 100644 portal-db/schema/003_postgrest_transactions.sql delete mode 100644 portal-db/sdk/typescript/src/apis/ApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/GatewaysApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcArmorApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts rename portal-db/sdk/typescript/src/apis/{RpcMeApi.ts => RpcGenRandomUuidApi.ts} (61%) create mode 100644 portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts delete mode 100644 portal-db/sdk/typescript/src/models/Applications.ts delete mode 100644 portal-db/sdk/typescript/src/models/Gateways.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts diff --git a/portal-db/Makefile b/portal-db/Makefile index 09c6fadf4..9b1844e02 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -166,6 +166,11 @@ postgrest-swagger-ui: postgrest-generate-openapi ## Start Swagger UI to view Ope -v $(PWD)/api/openapi/openapi.json:/openapi.json:ro \ swaggerapi/swagger-ui +.PHONY: postgrest-generate-sdks +postgrest-generate-sdks: postgrest-generate-openapi ## Generate Go and TypeScript SDKs from OpenAPI specification + @echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." + cd api/codegen && ./generate-sdks.sh + # ============================================================================ # AUTHENTICATION & TESTING # ============================================================================ diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index d5c6966df..13ffec66b 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -145,7 +145,7 @@ rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" # Generate JWT token for authenticated access to get all endpoints echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." -JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) +JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh portal_db_admin 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) if [ -z "$JWT_TOKEN" ]; then echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." @@ -157,7 +157,7 @@ fi # Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." -if ! curl -s "$POSTGREST_URL" -H "Accept: application/json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then +if ! curl -s "$POSTGREST_URL" -H "Accept: application/openapi+json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" exit 1 fi @@ -382,7 +382,7 @@ echo " Go SDK: $GO_OUTPUT_DIR" echo " TypeScript: $TS_OUTPUT_DIR" echo "" echo -e "${BLUE}๐Ÿน Go SDK:${NC}" -echo " Module: github.com/grove/path/portal-db/sdk/go" +echo " Module: github.com/buildwithgrove/path/portal-db/sdk/go" echo " Package: portaldb" echo " Files:" echo " โ€ข models.go - Generated data models and types (updated)" @@ -408,7 +408,7 @@ echo "" echo -e "${BLUE}Go SDK:${NC}" echo " 1. Review generated models: cat $GO_OUTPUT_DIR/models.go | head -50" echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" -echo " 3. Import in your project: go get github.com/grove/path/portal-db/sdk/go" +echo " 3. Import in your project: go get github.com/buildwithgrove/path/portal-db/sdk/go" echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" echo "" echo -e "${BLUE}TypeScript SDK:${NC}" diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index 273e49a07..723bb88d8 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -1,3422 +1,4049 @@ { - "swagger": "2.0", - "info": { - "description": "", - "title": "standard public schema", - "version": "12.0.2 (a4e00ff)" - }, - "host": "localhost:3000", - "basePath": "/", - "schemes": [ - "http" - ], - "consumes": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json", - "text/csv" - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json", - "text/csv" - ], - "paths": { - "/": { - "get": { - "produces": [ - "application/openapi+json", - "application/json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "summary": "OpenAPI description (this document)", - "tags": [ - "Introspection" - ] - } - }, - "/service_fallbacks": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/service_fallbacks" - }, - "type": "array" + "openapi": "3.0.0", + "info": { + "description": "", + "title": "standard public schema", + "version": "12.0.2 (a4e00ff)" + }, + "paths": { + "/": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "OpenAPI description (this document)", + "tags": [ + "Introspection" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Fallback URLs for services when primary endpoints fail", - "tags": [ - "service_fallbacks" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.service_fallbacks" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } }, - "summary": "Fallback URLs for services when primary endpoints fail", - "tags": [ - "service_fallbacks" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Fallback URLs for services when primary endpoints fail", - "tags": [ - "service_fallbacks" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/parameters/body.service_fallbacks" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Fallback URLs for services when primary endpoints fail", - "tags": [ - "service_fallbacks" - ] - } - }, - "/portal_application_rbac": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/portal_application_rbac" - }, - "type": "array" + "/service_fallbacks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] } - }, - "206": { - "description": "Partial Content" - } }, - "summary": "User access controls for specific applications", - "tags": [ - "portal_application_rbac" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.portal_application_rbac" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "User access controls for specific applications", - "tags": [ - "portal_application_rbac" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "User access controls for specific applications", - "tags": [ - "portal_application_rbac" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/parameters/body.portal_application_rbac" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "User access controls for specific applications", - "tags": [ - "portal_application_rbac" - ] - } - }, - "/portal_plans": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/portal_plans" - }, - "type": "array" + "/portal_application_rbac": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_application_rbac" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_application_rbac" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Available subscription plans for Portal Accounts", - "tags": [ - "portal_plans" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.portal_plans" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } }, - "summary": "Available subscription plans for Portal Accounts", - "tags": [ - "portal_plans" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available subscription plans for Portal Accounts", - "tags": [ - "portal_plans" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/parameters/body.portal_plans" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available subscription plans for Portal Accounts", - "tags": [ - "portal_plans" - ] - } - }, - "/portal_applications": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/portal_applications" - }, - "type": "array" + "/portal_plans": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.portal_applications" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/parameters/body.portal_applications" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - } - }, - "/services": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/parameters/rowFilter.services.active" - }, - { - "$ref": "#/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/services" - }, - "type": "array" + "/portal_applications": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_applications" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_applications" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.services" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/parameters/rowFilter.services.active" - }, - { - "$ref": "#/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/parameters/rowFilter.services.active" - }, - { - "$ref": "#/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/parameters/body.services" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - } - }, - "/portal_accounts": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/portal_accounts" - }, - "type": "array" + "/services": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.portal_accounts" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/parameters/body.portal_accounts" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - } - }, - "/organizations": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/organizations" - }, - "type": "array" + "/portal_accounts": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.organizations" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/parameters/body.organizations" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - } - }, - "/networks": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/networks" - }, - "type": "array" + "/organizations": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.networks" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/parameters/body.networks" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - } - }, - "/portal_account_rbac": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/portal_account_rbac" - }, - "type": "array" + "/networks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.portal_account_rbac" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/parameters/body.portal_account_rbac" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - } - }, - "/service_endpoints": { - "get": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/order" - }, - { - "$ref": "#/parameters/range" - }, - { - "$ref": "#/parameters/rangeUnit" - }, - { - "$ref": "#/parameters/offset" - }, - { - "$ref": "#/parameters/limit" - }, - { - "$ref": "#/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/service_endpoints" - }, - "type": "array" + "/portal_account_rbac": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_account_rbac" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_account_rbac" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/parameters/body.service_endpoints" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/preferPost" - } - ], - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/parameters/body.service_endpoints" - }, - { - "$ref": "#/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - } - }, - "/rpc/gen_salt": { - "get": { - "parameters": [ - { - "format": "text", - "in": "query", - "name": "", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" + "/service_endpoints": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - } - }, - "/rpc/pgp_armor_headers": { - "get": { - "parameters": [ - { - "format": "text", - "in": "query", - "name": "", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" + "/rpc/gen_salt": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_salt" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_salt" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - } - }, - "/rpc/armor": { - "get": { - "parameters": [ - { - "format": "bytea", - "in": "query", - "name": "", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) armor" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" + "/rpc/pgp_armor_headers": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_armor_headers" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_armor_headers" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } }, - "tags": [ - "(rpc) armor" - ] - } - }, - "/rpc/pgp_key_id": { - "get": { - "parameters": [ - { - "format": "bytea", - "in": "query", - "name": "", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" + "/rpc/armor": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) armor" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) armor" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - } - }, - "/rpc/dearmor": { - "get": { - "parameters": [ - { - "format": "text", - "in": "query", - "name": "", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } }, - "tags": [ - "(rpc) dearmor" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" + "/rpc/pgp_key_id": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_key_id" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_key_id" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) dearmor" - ] - } - }, - "/rpc/gen_random_uuid": { - "get": { - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } }, - "tags": [ - "(rpc) gen_random_uuid" - ] - }, - "post": { - "parameters": [ - { - "in": "body", - "name": "args", - "required": true, - "schema": { - "type": "object" + "/rpc/dearmor": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) dearmor" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) dearmor" + ] } - }, - { - "$ref": "#/parameters/preferParams" - } - ], - "produces": [ - "application/json", - "application/vnd.pgrst.object+json;nulls=stripped", - "application/vnd.pgrst.object+json" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_random_uuid" - ] - } - } - }, - "definitions": { - "service_fallbacks": { - "description": "Fallback URLs for services when primary endpoints fail", - "required": [ - "service_fallback_id", - "service_id", - "fallback_url" - ], - "properties": { - "service_fallback_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "service_id": { - "description": "Note:\nThis is a Foreign Key to `services.service_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "fallback_url": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_application_rbac": { - "description": "User access controls for specific applications", - "required": [ - "id", - "portal_application_id", - "portal_user_id" - ], - "properties": { - "id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "portal_application_id": { - "description": "Note:\nThis is a Foreign Key to `portal_applications.portal_application_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_user_id": { - "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_plans": { - "description": "Available subscription plans for Portal Accounts", - "required": [ - "portal_plan_type" - ], - "properties": { - "portal_plan_type": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "portal_plan_type_description": { - "format": "character varying", - "maxLength": 420, - "type": "string" - }, - "plan_usage_limit": { - "description": "Maximum usage allowed within the interval", - "format": "integer", - "type": "integer" - }, - "plan_usage_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "plan_rate_limit_rps": { - "description": "Rate limit in requests per second", - "format": "integer", - "type": "integer" - }, - "plan_application_limit": { - "format": "integer", - "type": "integer" - } - }, - "type": "object" - }, - "portal_applications": { - "description": "Applications created within portal accounts with their own rate limits and settings", - "required": [ - "portal_application_id", - "portal_account_id" - ], - "properties": { - "portal_application_id": { - "default": "gen_random_uuid()", - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_account_id": { - "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_application_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "emoji": { - "format": "character varying", - "maxLength": 16, - "type": "string" - }, - "portal_application_user_limit": { - "format": "integer", - "type": "integer" - }, - "portal_application_user_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "portal_application_user_limit_rps": { - "format": "integer", - "type": "integer" - }, - "portal_application_description": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "favorite_service_ids": { - "format": "character varying[]", - "items": { - "type": "string" - }, - "type": "array" - }, - "secret_key_hash": { - "description": "Hashed secret key for application authentication", - "format": "character varying", - "maxLength": 255, - "type": "string" }, - "secret_key_required": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "services": { - "description": "Supported blockchain services from the Pocket Network", - "required": [ - "service_id", - "service_name", - "service_domains" - ], - "properties": { - "service_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "service_name": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "compute_units_per_relay": { - "description": "Cost in compute units for each relay", - "format": "integer", - "type": "integer" - }, - "service_domains": { - "description": "Valid domains for this service", - "format": "character varying[]", - "items": { - "type": "string" - }, - "type": "array" - }, - "service_owner_address": { - "format": "character varying", - "maxLength": 50, - "type": "string" - }, - "network_id": { - "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "active": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "beta": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "coming_soon": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "quality_fallback_enabled": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "hard_fallback_enabled": { - "default": false, - "format": "boolean", - "type": "boolean" - }, - "svg_icon": { - "format": "text", - "type": "string" - }, - "public_endpoint_url": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "status_endpoint_url": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "status_query": { - "format": "text", - "type": "string" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_accounts": { - "description": "Multi-tenant accounts with plans and billing integration", - "required": [ - "portal_account_id", - "portal_plan_type" - ], - "properties": { - "portal_account_id": { - "default": "gen_random_uuid()", - "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "organization_id": { - "description": "Note:\nThis is a Foreign Key to `organizations.organization_id`.", - "format": "integer", - "type": "integer" - }, - "portal_plan_type": { - "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "user_account_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "internal_account_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "portal_account_user_limit": { - "format": "integer", - "type": "integer" - }, - "portal_account_user_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "portal_account_user_limit_rps": { - "format": "integer", - "type": "integer" - }, - "billing_type": { - "format": "character varying", - "maxLength": 20, - "type": "string" - }, - "stripe_subscription_id": { - "description": "Stripe subscription identifier for billing", - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "gcp_account_id": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "gcp_entitlement_id": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "organizations": { - "description": "Companies or customer groups that can be attached to Portal Accounts", - "required": [ - "organization_id", - "organization_name" - ], - "properties": { - "organization_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "organization_name": { - "description": "Name of the organization", - "format": "character varying", - "maxLength": 69, - "type": "string" - }, - "deleted_at": { - "description": "Soft delete timestamp", - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" + "/rpc/gen_random_uuid": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_random_uuid" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "type": "object" + } + }, + "text/csv": { + "schema": { + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_random_uuid" + ] + } } - }, - "type": "object" }, - "networks": { - "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "required": [ - "network_id" - ], - "properties": { - "network_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - } - }, - "type": "object" + "externalDocs": { + "description": "PostgREST Documentation", + "url": "https://postgrest.org/en/v12.0/api.html" }, - "portal_account_rbac": { - "description": "User roles and permissions for specific portal accounts", - "required": [ - "id", - "portal_account_id", - "portal_user_id", - "role_name" - ], - "properties": { - "id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "portal_account_id": { - "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_user_id": { - "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "role_name": { - "format": "character varying", - "maxLength": 20, - "type": "string" - }, - "user_joined_account": { - "default": false, - "format": "boolean", - "type": "boolean" + "servers": [ + { + "url": "http://localhost:3000" } - }, - "type": "object" - }, - "service_endpoints": { - "description": "Available endpoint types for each service", - "required": [ - "endpoint_id", - "service_id" - ], - "properties": { - "endpoint_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "service_id": { - "description": "Note:\nThis is a Foreign Key to `services.service_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "endpoint_type": { - "enum": [ - "cometBFT", - "cosmos", - "REST", - "JSON-RPC", - "WSS", - "gRPC" - ], - "format": "public.endpoint_type", - "type": "string" + ], + "components": { + "parameters": { + "preferParams": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "params=single-object" + ] + } + }, + "preferReturn": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none" + ] + } + }, + "preferCount": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "count=none" + ] + } + }, + "preferPost": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none", + "resolution=ignore-duplicates", + "resolution=merge-duplicates" + ] + } + }, + "select": { + "name": "select", + "description": "Filtering Columns", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "on_conflict": { + "name": "on_conflict", + "description": "On Conflict", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "order": { + "name": "order", + "description": "Ordering", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "range": { + "name": "Range", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string" + } + }, + "rangeUnit": { + "name": "Range-Unit", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string", + "default": "items" + } + }, + "offset": { + "name": "offset", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "limit": { + "name": "limit", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "rowFilter.service_fallbacks.service_fallback_id": { + "name": "service_fallback_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_fallbacks.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.fallback_url": { + "name": "fallback_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_fallbacks.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_application_rbac.id": { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_application_rbac.portal_application_id": { + "name": "portal_application_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_application_rbac.portal_user_id": { + "name": "portal_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_application_rbac.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_application_rbac.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_plans.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.portal_plan_type_description": { + "name": "portal_plan_type_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.plan_usage_limit": { + "name": "plan_usage_limit", + "description": "Maximum usage allowed within the interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_usage_limit_interval": { + "name": "plan_usage_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_plans.plan_rate_limit_rps": { + "name": "plan_rate_limit_rps", + "description": "Rate limit in requests per second", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_application_limit": { + "name": "plan_application_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_id": { + "name": "portal_application_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_application_name": { + "name": "portal_application_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.emoji": { + "name": "emoji", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_application_user_limit": { + "name": "portal_application_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_interval": { + "name": "portal_application_user_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_rps": { + "name": "portal_application_user_limit_rps", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_description": { + "name": "portal_application_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.favorite_service_ids": { + "name": "favorite_service_ids", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.portal_applications.secret_key_hash": { + "name": "secret_key_hash", + "description": "Hashed secret key for application authentication", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.secret_key_required": { + "name": "secret_key_required", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.portal_applications.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.service_name": { + "name": "service_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.compute_units_per_relay": { + "name": "compute_units_per_relay", + "description": "Cost in compute units for each relay", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.services.service_domains": { + "name": "service_domains", + "description": "Valid domains for this service", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.services.service_owner_address": { + "name": "service_owner_address", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.active": { + "name": "active", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.beta": { + "name": "beta", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.coming_soon": { + "name": "coming_soon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.quality_fallback_enabled": { + "name": "quality_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.hard_fallback_enabled": { + "name": "hard_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.svg_icon": { + "name": "svg_icon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" + } + }, + "rowFilter.services.public_endpoint_url": { + "name": "public_endpoint_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.status_endpoint_url": { + "name": "status_endpoint_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.status_query": { + "name": "status_query", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" + } + }, + "rowFilter.services.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.portal_account_id": { + "name": "portal_account_id", + "description": "Unique identifier for the portal account", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.organization_id": { + "name": "organization_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.user_account_name": { + "name": "user_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.internal_account_name": { + "name": "internal_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit": { + "name": "portal_account_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit_interval": { + "name": "portal_account_user_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit_rps": { + "name": "portal_account_user_limit_rps", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.billing_type": { + "name": "billing_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.stripe_subscription_id": { + "name": "stripe_subscription_id", + "description": "Stripe subscription identifier for billing", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.gcp_account_id": { + "name": "gcp_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.gcp_entitlement_id": { + "name": "gcp_entitlement_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.organization_id": { + "name": "organization_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.organizations.organization_name": { + "name": "organization_name", + "description": "Name of the organization", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.organizations.deleted_at": { + "name": "deleted_at", + "description": "Soft delete timestamp", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.networks.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.id": { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_account_rbac.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.portal_user_id": { + "name": "portal_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.role_name": { + "name": "role_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.user_joined_account": { + "name": "user_joined_account", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.service_endpoints.endpoint_id": { + "name": "endpoint_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_endpoints.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_endpoints.endpoint_type": { + "name": "endpoint_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.endpoint_type" + } + }, + "rowFilter.service_endpoints.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_endpoints.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + } }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" + "requestBodies": { + "portal_accounts": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + } + }, + "description": "portal_accounts" + }, + "networks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/networks" + } + } + }, + "description": "networks" + }, + "service_endpoints": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + } + }, + "description": "service_endpoints" + }, + "Args": { + "content": { + "application/json": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + } + }, + "required": true + }, + "portal_applications": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + } + }, + "description": "portal_applications" + }, + "portal_account_rbac": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + } + }, + "description": "portal_account_rbac" + }, + "service_fallbacks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + } + }, + "description": "service_fallbacks" + }, + "portal_application_rbac": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + } + }, + "description": "portal_application_rbac" + }, + "portal_plans": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + } + }, + "description": "portal_plans" + }, + "services": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/services" + } + } + }, + "description": "services" + }, + "organizations": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + } + }, + "description": "organizations" + }, + "Args2": { + "content": { + "application/json": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + } + }, + "required": true + } }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" + "schemas": { + "service_fallbacks": { + "description": "Fallback URLs for services when primary endpoints fail", + "required": [ + "service_fallback_id", + "service_id", + "fallback_url" + ], + "properties": { + "service_fallback_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "fallback_url": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_application_rbac": { + "description": "User access controls for specific applications", + "required": [ + "id", + "portal_application_id", + "portal_user_id" + ], + "properties": { + "id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "portal_application_id": { + "description": "Note:\nThis is a Foreign Key to `portal_applications.portal_application_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_user_id": { + "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_plans": { + "description": "Available subscription plans for Portal Accounts", + "required": [ + "portal_plan_type" + ], + "properties": { + "portal_plan_type": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_plan_type_description": { + "format": "character varying", + "maxLength": 420, + "type": "string" + }, + "plan_usage_limit": { + "description": "Maximum usage allowed within the interval", + "format": "integer", + "type": "integer" + }, + "plan_usage_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "plan_rate_limit_rps": { + "description": "Rate limit in requests per second", + "format": "integer", + "type": "integer" + }, + "plan_application_limit": { + "format": "integer", + "type": "integer" + } + }, + "type": "object" + }, + "portal_applications": { + "description": "Applications created within portal accounts with their own rate limits and settings", + "required": [ + "portal_application_id", + "portal_account_id" + ], + "properties": { + "portal_application_id": { + "default": "gen_random_uuid()", + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_account_id": { + "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_application_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "emoji": { + "format": "character varying", + "maxLength": 16, + "type": "string" + }, + "portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_application_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "portal_application_description": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "secret_key_hash": { + "description": "Hashed secret key for application authentication", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "secret_key_required": { + "default": false, + + "type": "boolean" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "services": { + "description": "Supported blockchain services from the Pocket Network", + "required": [ + "service_id", + "service_name", + "service_domains" + ], + "properties": { + "service_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "service_name": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "compute_units_per_relay": { + "description": "Cost in compute units for each relay", + "format": "integer", + "type": "integer" + }, + "service_domains": { + "description": "Valid domains for this service", + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "service_owner_address": { + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "network_id": { + "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "active": { + "default": false, + + "type": "boolean" + }, + "beta": { + "default": false, + + "type": "boolean" + }, + "coming_soon": { + "default": false, + + "type": "boolean" + }, + "quality_fallback_enabled": { + "default": false, + + "type": "boolean" + }, + "hard_fallback_enabled": { + "default": false, + + "type": "boolean" + }, + "svg_icon": { + "format": "text", + "type": "string" + }, + "public_endpoint_url": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "status_endpoint_url": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "status_query": { + "format": "text", + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_accounts": { + "description": "Multi-tenant accounts with plans and billing integration", + "required": [ + "portal_account_id", + "portal_plan_type" + ], + "properties": { + "portal_account_id": { + "default": "gen_random_uuid()", + "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "organization_id": { + "description": "Note:\nThis is a Foreign Key to `organizations.organization_id`.", + "format": "integer", + "type": "integer" + }, + "portal_plan_type": { + "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "user_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "internal_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_account_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_account_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_account_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "billing_type": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "stripe_subscription_id": { + "description": "Stripe subscription identifier for billing", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_account_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_entitlement_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "organizations": { + "description": "Companies or customer groups that can be attached to Portal Accounts", + "required": [ + "organization_id", + "organization_name" + ], + "properties": { + "organization_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "organization_name": { + "description": "Name of the organization", + "format": "character varying", + "maxLength": 69, + "type": "string" + }, + "deleted_at": { + "description": "Soft delete timestamp", + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "networks": { + "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "required": [ + "network_id" + ], + "properties": { + "network_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + } + }, + "type": "object" + }, + "portal_account_rbac": { + "description": "User roles and permissions for specific portal accounts", + "required": [ + "id", + "portal_account_id", + "portal_user_id", + "role_name" + ], + "properties": { + "id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "portal_account_id": { + "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_user_id": { + "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "role_name": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "user_joined_account": { + "default": false, + + "type": "boolean" + } + }, + "type": "object" + }, + "service_endpoints": { + "description": "Available endpoint types for each service", + "required": [ + "endpoint_id", + "service_id" + ], + "properties": { + "endpoint_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "endpoint_type": { + "enum": [ + "cometBFT", + "cosmos", + "REST", + "JSON-RPC", + "WSS", + "gRPC" + ], + "format": "public.endpoint_type", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + } } - }, - "type": "object" - } - }, - "parameters": { - "preferParams": { - "name": "Prefer", - "description": "Preference", - "required": false, - "enum": [ - "params=single-object" - ], - "in": "header", - "type": "string" - }, - "preferReturn": { - "name": "Prefer", - "description": "Preference", - "required": false, - "enum": [ - "return=representation", - "return=minimal", - "return=none" - ], - "in": "header", - "type": "string" - }, - "preferCount": { - "name": "Prefer", - "description": "Preference", - "required": false, - "enum": [ - "count=none" - ], - "in": "header", - "type": "string" - }, - "preferPost": { - "name": "Prefer", - "description": "Preference", - "required": false, - "enum": [ - "return=representation", - "return=minimal", - "return=none", - "resolution=ignore-duplicates", - "resolution=merge-duplicates" - ], - "in": "header", - "type": "string" - }, - "select": { - "name": "select", - "description": "Filtering Columns", - "required": false, - "in": "query", - "type": "string" - }, - "on_conflict": { - "name": "on_conflict", - "description": "On Conflict", - "required": false, - "in": "query", - "type": "string" - }, - "order": { - "name": "order", - "description": "Ordering", - "required": false, - "in": "query", - "type": "string" - }, - "range": { - "name": "Range", - "description": "Limiting and Pagination", - "required": false, - "in": "header", - "type": "string" - }, - "rangeUnit": { - "name": "Range-Unit", - "description": "Limiting and Pagination", - "required": false, - "default": "items", - "in": "header", - "type": "string" - }, - "offset": { - "name": "offset", - "description": "Limiting and Pagination", - "required": false, - "in": "query", - "type": "string" - }, - "limit": { - "name": "limit", - "description": "Limiting and Pagination", - "required": false, - "in": "query", - "type": "string" - }, - "body.service_fallbacks": { - "name": "service_fallbacks", - "description": "service_fallbacks", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/service_fallbacks" - } - }, - "rowFilter.service_fallbacks.service_fallback_id": { - "name": "service_fallback_id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.service_fallbacks.service_id": { - "name": "service_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.service_fallbacks.fallback_url": { - "name": "fallback_url", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.service_fallbacks.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.service_fallbacks.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.portal_application_rbac": { - "name": "portal_application_rbac", - "description": "portal_application_rbac", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/portal_application_rbac" - } - }, - "rowFilter.portal_application_rbac.id": { - "name": "id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_application_rbac.portal_application_id": { - "name": "portal_application_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_application_rbac.portal_user_id": { - "name": "portal_user_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_application_rbac.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.portal_application_rbac.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.portal_plans": { - "name": "portal_plans", - "description": "portal_plans", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/portal_plans" - } - }, - "rowFilter.portal_plans.portal_plan_type": { - "name": "portal_plan_type", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_plans.portal_plan_type_description": { - "name": "portal_plan_type_description", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_plans.plan_usage_limit": { - "name": "plan_usage_limit", - "description": "Maximum usage allowed within the interval", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_plans.plan_usage_limit_interval": { - "name": "plan_usage_limit_interval", - "required": false, - "format": "public.plan_interval", - "in": "query", - "type": "string" - }, - "rowFilter.portal_plans.plan_rate_limit_rps": { - "name": "plan_rate_limit_rps", - "description": "Rate limit in requests per second", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_plans.plan_application_limit": { - "name": "plan_application_limit", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "body.portal_applications": { - "name": "portal_applications", - "description": "portal_applications", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/portal_applications" - } - }, - "rowFilter.portal_applications.portal_application_id": { - "name": "portal_application_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_account_id": { - "name": "portal_account_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_application_name": { - "name": "portal_application_name", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.emoji": { - "name": "emoji", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_application_user_limit": { - "name": "portal_application_user_limit", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_application_user_limit_interval": { - "name": "portal_application_user_limit_interval", - "required": false, - "format": "public.plan_interval", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_application_user_limit_rps": { - "name": "portal_application_user_limit_rps", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.portal_application_description": { - "name": "portal_application_description", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.favorite_service_ids": { - "name": "favorite_service_ids", - "required": false, - "format": "character varying[]", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.secret_key_hash": { - "name": "secret_key_hash", - "description": "Hashed secret key for application authentication", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.secret_key_required": { - "name": "secret_key_required", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.deleted_at": { - "name": "deleted_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.portal_applications.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.services": { - "name": "services", - "description": "services", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/services" - } - }, - "rowFilter.services.service_id": { - "name": "service_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.service_name": { - "name": "service_name", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.compute_units_per_relay": { - "name": "compute_units_per_relay", - "description": "Cost in compute units for each relay", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.services.service_domains": { - "name": "service_domains", - "description": "Valid domains for this service", - "required": false, - "format": "character varying[]", - "in": "query", - "type": "string" - }, - "rowFilter.services.service_owner_address": { - "name": "service_owner_address", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.network_id": { - "name": "network_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.active": { - "name": "active", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.services.beta": { - "name": "beta", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.services.coming_soon": { - "name": "coming_soon", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.services.quality_fallback_enabled": { - "name": "quality_fallback_enabled", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.services.hard_fallback_enabled": { - "name": "hard_fallback_enabled", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "rowFilter.services.svg_icon": { - "name": "svg_icon", - "required": false, - "format": "text", - "in": "query", - "type": "string" - }, - "rowFilter.services.public_endpoint_url": { - "name": "public_endpoint_url", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.status_endpoint_url": { - "name": "status_endpoint_url", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.services.status_query": { - "name": "status_query", - "required": false, - "format": "text", - "in": "query", - "type": "string" - }, - "rowFilter.services.deleted_at": { - "name": "deleted_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.services.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.services.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.portal_accounts": { - "name": "portal_accounts", - "description": "portal_accounts", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/portal_accounts" - } - }, - "rowFilter.portal_accounts.portal_account_id": { - "name": "portal_account_id", - "description": "Unique identifier for the portal account", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.organization_id": { - "name": "organization_id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.portal_plan_type": { - "name": "portal_plan_type", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.user_account_name": { - "name": "user_account_name", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.internal_account_name": { - "name": "internal_account_name", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.portal_account_user_limit": { - "name": "portal_account_user_limit", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.portal_account_user_limit_interval": { - "name": "portal_account_user_limit_interval", - "required": false, - "format": "public.plan_interval", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.portal_account_user_limit_rps": { - "name": "portal_account_user_limit_rps", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.billing_type": { - "name": "billing_type", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.stripe_subscription_id": { - "name": "stripe_subscription_id", - "description": "Stripe subscription identifier for billing", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.gcp_account_id": { - "name": "gcp_account_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.gcp_entitlement_id": { - "name": "gcp_entitlement_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.deleted_at": { - "name": "deleted_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.portal_accounts.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.organizations": { - "name": "organizations", - "description": "organizations", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/organizations" - } - }, - "rowFilter.organizations.organization_id": { - "name": "organization_id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.organizations.organization_name": { - "name": "organization_name", - "description": "Name of the organization", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.organizations.deleted_at": { - "name": "deleted_at", - "description": "Soft delete timestamp", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.organizations.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.organizations.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "body.networks": { - "name": "networks", - "description": "networks", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/networks" - } - }, - "rowFilter.networks.network_id": { - "name": "network_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "body.portal_account_rbac": { - "name": "portal_account_rbac", - "description": "portal_account_rbac", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/portal_account_rbac" - } - }, - "rowFilter.portal_account_rbac.id": { - "name": "id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.portal_account_rbac.portal_account_id": { - "name": "portal_account_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_account_rbac.portal_user_id": { - "name": "portal_user_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_account_rbac.role_name": { - "name": "role_name", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.portal_account_rbac.user_joined_account": { - "name": "user_joined_account", - "required": false, - "format": "boolean", - "in": "query", - "type": "string" - }, - "body.service_endpoints": { - "name": "service_endpoints", - "description": "service_endpoints", - "required": false, - "in": "body", - "schema": { - "$ref": "#/definitions/service_endpoints" - } - }, - "rowFilter.service_endpoints.endpoint_id": { - "name": "endpoint_id", - "required": false, - "format": "integer", - "in": "query", - "type": "string" - }, - "rowFilter.service_endpoints.service_id": { - "name": "service_id", - "required": false, - "format": "character varying", - "in": "query", - "type": "string" - }, - "rowFilter.service_endpoints.endpoint_type": { - "name": "endpoint_type", - "required": false, - "format": "public.endpoint_type", - "in": "query", - "type": "string" - }, - "rowFilter.service_endpoints.created_at": { - "name": "created_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" - }, - "rowFilter.service_endpoints.updated_at": { - "name": "updated_at", - "required": false, - "format": "timestamp with time zone", - "in": "query", - "type": "string" } - }, - "externalDocs": { - "description": "PostgREST Documentation", - "url": "https://postgrest.org/en/v12.0/api.html" - } } \ No newline at end of file diff --git a/portal-db/api/scripts/003_set_authenticator_password.sql b/portal-db/api/scripts/003_set_authenticator_password.sql new file mode 100644 index 000000000..22549cca1 --- /dev/null +++ b/portal-db/api/scripts/003_set_authenticator_password.sql @@ -0,0 +1,31 @@ +-- ============================================================================ +-- Set Authenticator Password for Local Development +-- ============================================================================ +-- This script sets the password for the PostgREST authenticator role. +-- This is separate from the role creation to follow the principle of +-- configuring passwords outside of the main schema migrations. +-- +-- โš ๏ธ LOCAL DEVELOPMENT ONLY - NOT FOR PRODUCTION USE +-- +-- In production environments, database passwords should be managed through: +-- - Environment-specific secrets management (e.g., Kubernetes secrets) +-- - Cloud provider secret managers (e.g., GCP Secret Manager, AWS Secrets Manager) +-- - Proper credential rotation and security policies +-- +-- This script is only intended for local development convenience. +-- ============================================================================ + +-- Set password for the authenticator role (local development only) +ALTER ROLE authenticator WITH PASSWORD 'authenticator_password'; + +-- Verify the role exists and has the correct configuration +DO $$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'authenticator') THEN + RAISE EXCEPTION 'authenticator role does not exist'; + END IF; + + RAISE NOTICE 'LOCAL DEV: authenticator role password has been set for local development'; + RAISE NOTICE 'LOCAL DEV: โš ๏ธ This configuration is for LOCAL DEVELOPMENT ONLY'; +END +$$; diff --git a/portal-db/api/scripts/test-portal-app-creation.sh b/portal-db/api/scripts/test-portal-app-creation.sh deleted file mode 100755 index 1875bc311..000000000 --- a/portal-db/api/scripts/test-portal-app-creation.sh +++ /dev/null @@ -1,181 +0,0 @@ -#!/bin/bash - -# ๐Ÿงช Test Script for Portal Application Creation -# This script tests the create_portal_application function and retrieval - -set -e - -# ๐ŸŽจ Color codes for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -PURPLE='\033[0;35m' -CYAN='\033[0;36m' -NC='\033[0m' # No Color - -# ๐Ÿ“ Function to print colored output -print_status() { - local color=$1 - local message=$2 - echo -e "${color}${message}${NC}" -} - -# ๐Ÿ” Function to validate PostgREST is running -validate_postgrest() { - print_status $BLUE "๐Ÿ” Checking if PostgREST is running..." - if ! curl -s http://localhost:3000/ > /dev/null 2>&1; then - print_status $RED "โŒ Error: PostgREST is not running on localhost:3000" - print_status $YELLOW "๐Ÿ’ก Start the services first: make postgrest-up" - exit 1 - fi - print_status $GREEN "โœ… PostgREST is running" -} - -# ๐Ÿ”‘ Function to generate JWT token -generate_jwt() { - print_status $BLUE "๐Ÿ”‘ Generating JWT token..." - JWT_TOKEN=$(./gen-jwt.sh authenticated 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) - if [ -z "$JWT_TOKEN" ]; then - print_status $RED "โŒ Error: Failed to generate JWT token" - exit 1 - fi - print_status $GREEN "โœ… JWT token generated" -} - -# ๐Ÿ“ฑ Function to create portal application -create_portal_app() { - print_status $BLUE "๐Ÿ“ฑ Creating new portal application..." - - # Generate a unique app name with timestamp - TIMESTAMP=$(date +%s) - APP_NAME="Test App ${TIMESTAMP}" - - CREATE_RESPONSE=$(curl -s -X POST http://localhost:3000/rpc/create_portal_application \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $JWT_TOKEN" \ - -d "{ - \"p_portal_account_id\": \"10000000-0000-0000-0000-000000000001\", - \"p_portal_user_id\": \"00000000-0000-0000-0000-000000000002\", - \"p_portal_application_name\": \"$APP_NAME\", - \"p_portal_application_description\": \"Test application created via automated test\", - \"p_emoji\": \"๐Ÿงช\", - \"p_secret_key_required\": \"false\" - }") - - # Check if the response contains an error - if echo "$CREATE_RESPONSE" | grep -q "\"code\""; then - print_status $RED "โŒ Error creating portal application:" - echo "$CREATE_RESPONSE" | jq '.' - exit 1 - fi - - # Extract the application ID from the response - APP_ID=$(echo "$CREATE_RESPONSE" | jq -r '.portal_application_id') - SECRET_KEY=$(echo "$CREATE_RESPONSE" | jq -r '.secret_key') - - if [ "$APP_ID" = "null" ] || [ -z "$APP_ID" ]; then - print_status $RED "โŒ Error: Could not extract application ID from response" - echo "$CREATE_RESPONSE" - exit 1 - fi - - print_status $GREEN "โœ… Portal application created successfully!" - print_status $CYAN " ๐Ÿ“ฑ Application ID: $APP_ID" - print_status $CYAN " ๐Ÿท๏ธ Application Name: $APP_NAME" - print_status $CYAN " ๐Ÿ”‘ Secret Key: $SECRET_KEY" - - echo "" - print_status $PURPLE "๐Ÿ“‹ Full Create Response:" - echo "$CREATE_RESPONSE" | jq '.' -} - -# ๐Ÿ” Function to retrieve portal application -retrieve_portal_app() { - print_status $BLUE "๐Ÿ” Retrieving portal application by ID..." - - RETRIEVE_RESPONSE=$(curl -s -X GET \ - "http://localhost:3000/portal_applications?portal_application_id=eq.$APP_ID" \ - -H "Authorization: Bearer $JWT_TOKEN") - - # Check if we got results - APP_COUNT=$(echo "$RETRIEVE_RESPONSE" | jq '. | length') - if [ "$APP_COUNT" -eq "0" ]; then - print_status $RED "โŒ Error: Application not found in database" - exit 1 - fi - - print_status $GREEN "โœ… Portal application retrieved successfully!" - - echo "" - print_status $PURPLE "๐Ÿ“‹ Full Retrieve Response:" - echo "$RETRIEVE_RESPONSE" | jq '.' - - # Extract key fields for comparison - RETRIEVED_NAME=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_name') - RETRIEVED_DESCRIPTION=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_description') - RETRIEVED_EMOJI=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].emoji') - - print_status $CYAN " ๐Ÿท๏ธ Retrieved Name: $RETRIEVED_NAME" - print_status $CYAN " ๐Ÿ“ Retrieved Description: $RETRIEVED_DESCRIPTION" - print_status $CYAN " ๐Ÿ˜Š Retrieved Emoji: $RETRIEVED_EMOJI" -} - -# ๐Ÿ” Function to test retrieval by name -retrieve_by_name() { - print_status $BLUE "๐Ÿ” Testing retrieval by application name..." - - # URL encode the app name - ENCODED_NAME=$(echo "$APP_NAME" | sed 's/ /%20/g') - - RETRIEVE_BY_NAME_RESPONSE=$(curl -s -X GET \ - "http://localhost:3000/portal_applications?portal_application_name=eq.$ENCODED_NAME" \ - -H "Authorization: Bearer $JWT_TOKEN") - - APP_COUNT_BY_NAME=$(echo "$RETRIEVE_BY_NAME_RESPONSE" | jq '. | length') - if [ "$APP_COUNT_BY_NAME" -eq "0" ]; then - print_status $RED "โŒ Error: Application not found by name" - exit 1 - fi - - print_status $GREEN "โœ… Portal application found by name!" - print_status $CYAN " Found $APP_COUNT_BY_NAME application(s) with name: $APP_NAME" -} - -# ๐Ÿ“Š Function to show test summary -show_summary() { - echo "" - print_status $PURPLE "======================================" - print_status $PURPLE "๐ŸŽ‰ TEST SUMMARY" - print_status $PURPLE "======================================" - print_status $GREEN "โœ… PostgREST API connectivity" - print_status $GREEN "โœ… JWT token generation" - print_status $GREEN "โœ… Portal application creation" - print_status $GREEN "โœ… Portal application retrieval by ID" - print_status $GREEN "โœ… Portal application retrieval by name" - print_status $PURPLE "======================================" - print_status $CYAN "๐Ÿ’ก Created application ID: $APP_ID" - print_status $CYAN "๐Ÿ’ก Application name: $APP_NAME" - print_status $CYAN "๐Ÿ’ก Secret key: $SECRET_KEY" - print_status $PURPLE "======================================" -} - -# ๐ŸŽฏ Main execution -main() { - print_status $PURPLE "๐Ÿงช Portal Application Creation Test" - print_status $PURPLE "====================================" - echo "" - - # Run all test steps - validate_postgrest - generate_jwt - create_portal_app - retrieve_portal_app - retrieve_by_name - show_summary - - print_status $GREEN "๐ŸŽ‰ All tests passed successfully!" -} - -# ๐Ÿ Execute main function -main "$@" diff --git a/portal-db/api/scripts/test-postgrest-portal-app-creation.sh b/portal-db/api/scripts/test-postgrest-portal-app-creation.sh deleted file mode 100755 index d67bab5f3..000000000 --- a/portal-db/api/scripts/test-postgrest-portal-app-creation.sh +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/bash - -# ๐Ÿงช Test Script for Portal Application Creation -# This script exercises the PostgREST endpoints for inserting a portal -# application and its RBAC membership using the admin role. - -set -e - -# ๐ŸŽจ Color codes for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -PURPLE='\033[0;35m' -CYAN='\033[0;36m' -NC='\033[0m' # No Color - -# ๐Ÿ“ Function to print colored output -print_status() { - local color=$1 - local message=$2 - echo -e "${color}${message}${NC}" -} - -# ๐Ÿ” Function to validate PostgREST is running -validate_postgrest() { - print_status $BLUE "๐Ÿ” Checking if PostgREST is running..." - if ! curl -s http://localhost:3000/ > /dev/null 2>&1; then - print_status $RED "โŒ Error: PostgREST is not running on localhost:3000" - print_status $YELLOW "๐Ÿ’ก Start the services first: make portal-db-up" - exit 1 - fi - print_status $GREEN "โœ… PostgREST is running" -} - -# ๐Ÿ”‘ Function to generate JWT token -generate_jwt() { - print_status $BLUE "๐Ÿ”‘ Generating JWT token..." - JWT_TOKEN=$(./postgrest-gen-jwt.sh --token-only portal_db_admin admin@example.com 2>/dev/null) - if [ -z "$JWT_TOKEN" ]; then - print_status $RED "โŒ Error: Failed to generate JWT token" - exit 1 - fi - print_status $GREEN "โœ… JWT token generated" -} - -# ๐Ÿ“ฑ Function to create portal application -create_portal_app() { - print_status $BLUE "๐Ÿ“ฑ Creating new portal application..." - - TIMESTAMP=$(date +%s) - APP_NAME="Test App ${TIMESTAMP}" - - # Generate secret key and hash (hex encoded) - SECRET_KEY=$(openssl rand -hex 32) - SECRET_KEY_HASH=$(printf "%s" "$SECRET_KEY" | openssl dgst -sha256 | awk '{print $NF}' | tr -d '\n') - - CREATE_RESPONSE=$(curl -s -X POST http://localhost:3000/portal_applications \ - -H "Content-Type: application/json" \ - -H "Prefer: return=representation" \ - -H "Authorization: Bearer $JWT_TOKEN" \ - -d "{ - \"portal_account_id\": \"10000000-0000-0000-0000-000000000004\", - \"portal_application_name\": \"$APP_NAME\", - \"portal_application_description\": \"Test application created via automated test\", - \"emoji\": \"test\", - \"secret_key_hash\": \"$SECRET_KEY_HASH\", - \"secret_key_required\": false - }") - - if echo "$CREATE_RESPONSE" | jq -e '.[0]' >/dev/null 2>&1; then - APP_ID=$(echo "$CREATE_RESPONSE" | jq -r '.[0].portal_application_id') - else - print_status $RED "โŒ Error creating portal application:" - echo "$CREATE_RESPONSE" | jq '.' - exit 1 - fi - - if [ -z "$APP_ID" ] || [ "$APP_ID" = "null" ]; then - print_status $RED "โŒ Error: Could not extract application ID from response" - echo "$CREATE_RESPONSE" | jq '.' - exit 1 - fi - - print_status $GREEN "โœ… Portal application created successfully!" - print_status $CYAN " ๐Ÿ“ฑ Application ID: $APP_ID" - print_status $CYAN " ๐Ÿท๏ธ Application Name: $APP_NAME" - print_status $CYAN " ๐Ÿ”‘ Secret Key (store securely!): $SECRET_KEY" - - echo "" - print_status $PURPLE "๐Ÿ“‹ Full Create Response:" - echo "$CREATE_RESPONSE" | jq '.' -} - -# ๐Ÿ‘ฅ Function to grant user access via RBAC entry -create_portal_app_rbac() { - print_status $BLUE "๐Ÿ‘ฅ Assigning user to portal application..." - - RBAC_RESPONSE=$(curl -s -X POST http://localhost:3000/portal_application_rbac \ - -H "Content-Type: application/json" \ - -H "Prefer: return=representation" \ - -H "Authorization: Bearer $JWT_TOKEN" \ - -d "{ - \"portal_application_id\": \"$APP_ID\", - \"portal_user_id\": \"30000000-0000-0000-0000-000000000001\" - }") - - if echo "$RBAC_RESPONSE" | jq -e '.[0]' >/dev/null 2>&1; then - print_status $GREEN "โœ… Portal application RBAC entry created" - else - print_status $RED "โŒ Error creating RBAC entry:" - echo "$RBAC_RESPONSE" | jq '.' - exit 1 - fi -} - -# ๐Ÿ” Function to retrieve portal application -retrieve_portal_app() { - print_status $BLUE "๐Ÿ” Retrieving portal application by ID..." - - RETRIEVE_RESPONSE=$(curl -s -X GET \ - "http://localhost:3000/portal_applications?portal_application_id=eq.$APP_ID" \ - -H "Authorization: Bearer $JWT_TOKEN") - - # Check if we got results - APP_COUNT=$(echo "$RETRIEVE_RESPONSE" | jq '. | length') - if [ "$APP_COUNT" -eq "0" ]; then - print_status $RED "โŒ Error: Application not found in database" - exit 1 - fi - - print_status $GREEN "โœ… Portal application retrieved successfully!" - - echo "" - print_status $PURPLE "๐Ÿ“‹ Full Retrieve Response:" - echo "$RETRIEVE_RESPONSE" | jq '.' - - # Extract key fields for comparison - RETRIEVED_NAME=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_name') - RETRIEVED_DESCRIPTION=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].portal_application_description') - RETRIEVED_EMOJI=$(echo "$RETRIEVE_RESPONSE" | jq -r '.[0].emoji') - - print_status $CYAN " ๐Ÿท๏ธ Retrieved Name: $RETRIEVED_NAME" - print_status $CYAN " ๐Ÿ“ Retrieved Description: $RETRIEVED_DESCRIPTION" - print_status $CYAN " ๐Ÿ˜Š Retrieved Emoji: $RETRIEVED_EMOJI" -} - -# ๐Ÿ” Function to test retrieval by name -retrieve_by_name() { - print_status $BLUE "๐Ÿ” Testing retrieval by application name..." - - # URL encode the app name - ENCODED_NAME=$(echo "$APP_NAME" | sed 's/ /%20/g') - - RETRIEVE_BY_NAME_RESPONSE=$(curl -s -X GET \ - "http://localhost:3000/portal_applications?portal_application_name=eq.$ENCODED_NAME" \ - -H "Authorization: Bearer $JWT_TOKEN") - - APP_COUNT_BY_NAME=$(echo "$RETRIEVE_BY_NAME_RESPONSE" | jq '. | length') - if [ "$APP_COUNT_BY_NAME" -eq "0" ]; then - print_status $RED "โŒ Error: Application not found by name" - exit 1 - fi - - print_status $GREEN "โœ… Portal application found by name!" - print_status $CYAN " Found $APP_COUNT_BY_NAME application(s) with name: $APP_NAME" -} - -# ๐Ÿ“Š Function to show test summary -show_summary() { - echo "" - print_status $PURPLE "======================================" - print_status $PURPLE "๐ŸŽ‰ TEST SUMMARY" - print_status $PURPLE "======================================" - print_status $GREEN "โœ… PostgREST API connectivity" - print_status $GREEN "โœ… JWT token generation" - print_status $GREEN "โœ… Portal application creation" - print_status $GREEN "โœ… Portal application retrieval by ID" - print_status $GREEN "โœ… Portal application retrieval by name" - print_status $PURPLE "======================================" - print_status $CYAN "๐Ÿ’ก Created application ID: $APP_ID" - print_status $CYAN "๐Ÿ’ก Application name: $APP_NAME" - print_status $CYAN "๐Ÿ’ก Secret key: $SECRET_KEY" - print_status $PURPLE "======================================" -} - -# ๐ŸŽฏ Main execution -main() { - print_status $PURPLE "๐Ÿงช Portal Application Creation Test" - print_status $PURPLE "====================================" - echo "" - - # Run all test steps - validate_postgrest - generate_jwt - create_portal_app - create_portal_app_rbac - retrieve_portal_app - retrieve_by_name - show_summary - - print_status $GREEN "๐ŸŽ‰ All tests passed successfully!" -} - -# ๐Ÿ Execute main function -main "$@" diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 9b2d4fc35..cc8b35acf 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -47,6 +47,8 @@ services: - ./schema/001_portal_init.sql:/docker-entrypoint-initdb.d/001_portal_init.sql:ro # 002_postgrest_init.sql: PostgREST API setup (roles, permissions, JWT) - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro + # 003_set_authenticator_password.sql: Set authenticator password (LOCAL DEV ONLY) + - ./api/scripts/003_set_authenticator_password.sql:/docker-entrypoint-initdb.d/003_set_authenticator_password.sql:ro healthcheck: # Health check to ensure database is ready before starting PostgREST test: ["CMD", "pg_isready", "-U", "postgres", "-d", "portal_db"] diff --git a/portal-db/schema/001_schema.sql b/portal-db/schema/001_schema.sql deleted file mode 100644 index d018e7204..000000000 --- a/portal-db/schema/001_schema.sql +++ /dev/null @@ -1,456 +0,0 @@ --- ============================================================================ --- PATH Portal Database Schema --- ============================================================================ --- This file sets up the baseline for PATH's Portal DB. - --- ============================================================================ --- CUSTOM TYPES --- ============================================================================ - --- Designates the API Types that we support. We can expand this should new interfaces be introduced. --- Also used as a mapping for the types of QoS that should be attached to a service. -CREATE TYPE endpoint_type AS ENUM ('cometBFT', 'cosmos', 'REST', 'JSON-RPC', 'WSS', 'gRPC'); - --- Creates intervals that plans can be evaluated on, also enables users to set their plan limits -CREATE TYPE plan_interval AS ENUM ('day', 'month', 'year'); - --- Enables users to limit their application access --- Service ID - Allow specified list of onchain services --- Contract - Allow specific smart contracts --- Origin - Allow specific IP addresses or URLs -CREATE TYPE allowlist_type AS ENUM ('service_id', 'contract', 'origin'); - --- Add support for multiple auth providers offering different types --- Must be updated to extend authorization to other providers. --- --- Grove's portal uses Auth0 for authentication as of 09/2025. --- --- Envoy Gateway has native support for other OIDC authentication types: https://gateway.envoyproxy.io/docs/tasks/security/oidc/ --- For legacy support, only adding auth0 and its relevant types -CREATE TYPE portal_auth_provider AS ENUM ('auth0'); -CREATE TYPE portal_auth_type AS ENUM ('auth0_github', 'auth0_username', 'auth0_google'); - --- ============================================================================ --- CORE ORGANIZATIONAL TABLES --- ============================================================================ - --- Organizations table (referenced by contacts and portal_accounts) --- Organizations are Companies or Customer Groups that can be attached to Portal Accounts -CREATE TABLE organizations ( - organization_id SERIAL PRIMARY KEY, - organization_name VARCHAR(69) NOT NULL, - deleted_at TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -COMMENT ON TABLE organizations IS 'Companies or customer groups that can be attached to Portal Accounts'; -COMMENT ON COLUMN organizations.organization_name IS 'Name of the organization'; -COMMENT ON COLUMN organizations.deleted_at IS 'Soft delete timestamp'; - --- Organization tags table --- For categorizing and analyzing organizations -CREATE TABLE organization_tags ( - id SERIAL PRIMARY KEY, - organization_id INT NOT NULL, - tag VARCHAR(42), - FOREIGN KEY (organization_id) REFERENCES organizations(organization_id) ON DELETE CASCADE -); - -COMMENT ON TABLE organization_tags IS 'Tags for categorizing and analyzing organizations'; - --- ============================================================================ --- PORTAL PLANS AND ACCOUNTS --- ============================================================================ - --- Portal plans table --- Set of plans that can be assigned to Portal Accounts. i.e. PLAN_FREE, PLAN_UNLIMITED -CREATE TABLE portal_plans ( - portal_plan_type VARCHAR(42) PRIMARY KEY, - portal_plan_type_description VARCHAR(420), - plan_usage_limit INT CHECK (plan_usage_limit >= 0), - plan_usage_limit_interval plan_interval, - plan_rate_limit_rps INT CHECK (plan_rate_limit_rps >= 0), - plan_application_limit INT CHECK (plan_application_limit >= 0) -); - -COMMENT ON TABLE portal_plans IS 'Available subscription plans for Portal Accounts'; -COMMENT ON COLUMN portal_plans.plan_usage_limit IS 'Maximum usage allowed within the interval'; -COMMENT ON COLUMN portal_plans.plan_rate_limit_rps IS 'Rate limit in requests per second'; - --- Portal accounts table --- Portal Accounts can have many applications and many users. Only 1 user can be the OWNER. --- When a new user signs up in the Portal, they automatically generate a personal account. -CREATE TABLE portal_accounts ( - portal_account_id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), - organization_id INT, - portal_plan_type VARCHAR(42) NOT NULL, - user_account_name VARCHAR(42), - internal_account_name VARCHAR(42), - portal_account_user_limit INT CHECK (portal_account_user_limit >= 0), - portal_account_user_limit_interval plan_interval, - portal_account_user_limit_rps INT CHECK (portal_account_user_limit_rps >= 0), - billing_type VARCHAR(20), - stripe_subscription_id VARCHAR(255), - gcp_account_id VARCHAR(255), - gcp_entitlement_id VARCHAR(255), - deleted_at TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (organization_id) REFERENCES organizations(organization_id), - FOREIGN KEY (portal_plan_type) REFERENCES portal_plans(portal_plan_type) -); - -COMMENT ON TABLE portal_accounts IS 'Multi-tenant accounts with plans and billing integration'; -COMMENT ON COLUMN portal_accounts.portal_account_id IS 'Unique identifier for the portal account'; -COMMENT ON COLUMN portal_accounts.stripe_subscription_id IS 'Stripe subscription identifier for billing'; - --- ============================================================================ --- USER MANAGEMENT --- ============================================================================ - --- Portal users table --- Users can belong to multiple Accounts -CREATE TABLE portal_users ( - portal_user_id VARCHAR(36) PRIMARY KEY, - portal_user_email VARCHAR(255) NOT NULL UNIQUE, - signed_up BOOLEAN DEFAULT FALSE, - portal_admin BOOLEAN DEFAULT FALSE, - deleted_at TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -COMMENT ON TABLE portal_users IS 'Users who can access the portal and belong to multiple accounts'; -COMMENT ON COLUMN portal_users.portal_user_email IS 'Unique email address for the user'; -COMMENT ON COLUMN portal_users.portal_admin IS 'Whether user has admin privileges across the portal'; - --- Portal User Auth Table --- Determines which Auth Provider (portal_auth_provider) and which Auth Type --- (portal_auth_type) a user is authenticated into the Portal by -CREATE TABLE portal_user_auth ( - portal_user_auth_id SERIAL PRIMARY KEY, - portal_user_id VARCHAR(42), - portal_auth_provider portal_auth_provider, - portal_auth_type portal_auth_type, - auth_provider_user_id VARCHAR(69), - federated BOOL DEFAULT FALSE, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (portal_user_id) REFERENCES portal_users(portal_user_id) ON DELETE CASCADE -); - -COMMENT ON TABLE portal_user_auth IS 'Authorization provider and type for each user. Determines how to authenticate a user into the Portal.'; - --- Contacts table --- Contacts are individuals that are members of an Organization. Can be attached to Portal Users -CREATE TABLE contacts ( - contact_id SERIAL PRIMARY KEY, - organization_id INT, - portal_user_id VARCHAR(36), - contact_telegram_handle VARCHAR(32), - contact_twitter_handle VARCHAR(15), - contact_linkedin_handle VARCHAR(30), - contact_initial_meeting_location VARCHAR(100), - contact_initial_meeting_event VARCHAR(100), - contact_initial_meeting_datetime TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (organization_id) REFERENCES organizations(organization_id) ON DELETE CASCADE, - FOREIGN KEY (portal_user_id) REFERENCES portal_users(portal_user_id) -); - -COMMENT ON TABLE contacts IS 'Contact information for individuals associated with organizations'; - --- ============================================================================ --- RBAC (ROLE-BASED ACCESS CONTROL) --- ============================================================================ - --- RBAC table --- Sets the roles and permissions associated with roles across the Portal -CREATE TABLE rbac ( - role_id SERIAL PRIMARY KEY, - role_name VARCHAR(20), - permissions VARCHAR[] -); - -COMMENT ON TABLE rbac IS 'Role definitions and their associated permissions'; - --- Portal account RBAC table --- Sets the role and access controls for a user on a particular account. -CREATE TABLE portal_account_rbac ( - id SERIAL PRIMARY KEY, - portal_account_id VARCHAR(36) NOT NULL, - portal_user_id VARCHAR(36) NOT NULL, - role_name VARCHAR(20) NOT NULL, - user_joined_account BOOLEAN DEFAULT FALSE, - FOREIGN KEY (portal_account_id) REFERENCES portal_accounts(portal_account_id) ON DELETE CASCADE, - FOREIGN KEY (portal_user_id) REFERENCES portal_users(portal_user_id), - UNIQUE (portal_account_id, portal_user_id) -); - -COMMENT ON TABLE portal_account_rbac IS 'User roles and permissions for specific portal accounts'; - --- ============================================================================ --- APPLICATIONS --- ============================================================================ - --- Portal applications table --- Portal Accounts can have many Portal Applications that have associated settings. -CREATE TABLE portal_applications ( - portal_application_id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), - portal_account_id VARCHAR(36) NOT NULL, - portal_application_name VARCHAR(42), - emoji VARCHAR(16), - portal_application_user_limit INT CHECK (portal_application_user_limit >= 0), - portal_application_user_limit_interval plan_interval, - portal_application_user_limit_rps INT CHECK (portal_application_user_limit_rps >= 0), - portal_application_description VARCHAR(255), - favorite_service_ids VARCHAR[], - secret_key_hash VARCHAR(255), -- TODO_IMPROVE: Never store plain text secrets - use proper hashing - secret_key_required BOOLEAN DEFAULT FALSE, - deleted_at TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (portal_account_id) REFERENCES portal_accounts(portal_account_id) ON DELETE CASCADE -); - -COMMENT ON TABLE portal_applications IS 'Applications created within portal accounts with their own rate limits and settings'; -COMMENT ON COLUMN portal_applications.secret_key_hash IS 'Hashed secret key for application authentication'; - --- Portal application RBAC table --- Sets the role and access controls for a user on a particular application. --- Users must be members of the parent Account in order to have access to a particular application -CREATE TABLE portal_application_rbac ( - id SERIAL PRIMARY KEY, - portal_application_id VARCHAR(36) NOT NULL, - portal_user_id VARCHAR(36) NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (portal_application_id) REFERENCES portal_applications(portal_application_id) ON DELETE CASCADE, - FOREIGN KEY (portal_user_id) REFERENCES portal_users(portal_user_id), - UNIQUE (portal_application_id, portal_user_id) -); - -COMMENT ON TABLE portal_application_rbac IS 'User access controls for specific applications'; - --- ============================================================================ --- NETWORK AND INFRASTRUCTURE --- ============================================================================ - --- Networks table --- Future proofing table, but allows the Portal/PATH to send traffic on both Pocket Beta and Pocket Mainnet -CREATE TABLE networks ( - network_id VARCHAR(42) PRIMARY KEY -); - -COMMENT ON TABLE networks IS 'Supported blockchain networks (Pocket mainnet, testnet, etc.)'; - --- Pavers table -CREATE TABLE pavers ( - paver_id SERIAL PRIMARY KEY, - paver_url VARCHAR(69) NOT NULL, - network_id VARCHAR(42) NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (network_id) REFERENCES networks(network_id) -); - -COMMENT ON TABLE pavers IS 'Paver infrastructure endpoints for different networks'; - --- Gateways table --- Stores the relevant information for the onchain Gateway -CREATE TABLE gateways ( - gateway_address VARCHAR(50) PRIMARY KEY, - stake_amount BIGINT NOT NULL, - stake_denom VARCHAR(15) NOT NULL, - network_id VARCHAR(42) NOT NULL, - gateway_private_key_hex VARCHAR(64), -- TODO_CONSIDERATION: Store private keys only in encrypted manner and not in plain text - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (network_id) REFERENCES networks(network_id) -); - -COMMENT ON TABLE gateways IS 'Onchain gateway information including stake and network details'; -COMMENT ON COLUMN gateways.gateway_address IS 'Blockchain address of the gateway'; -COMMENT ON COLUMN gateways.stake_amount IS 'Amount of tokens staked by the gateway'; - --- ============================================================================ --- SERVICES --- ============================================================================ - --- Services table --- Stores the set of supported Services from the Pocket Chain -CREATE TABLE services ( - service_id VARCHAR(42) PRIMARY KEY, - service_name VARCHAR(169) NOT NULL, - compute_units_per_relay INT, - service_domains VARCHAR[] NOT NULL, - service_owner_address VARCHAR(50), - network_id VARCHAR(42), - active BOOLEAN DEFAULT FALSE, - beta BOOLEAN DEFAULT FALSE, - coming_soon BOOLEAN DEFAULT FALSE, - quality_fallback_enabled BOOLEAN DEFAULT FALSE, - hard_fallback_enabled BOOLEAN DEFAULT FALSE, - svg_icon TEXT, - public_endpoint_url VARCHAR(169), - status_endpoint_url VARCHAR(169), - status_query TEXT, - deleted_at TIMESTAMPTZ, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (network_id) REFERENCES networks(network_id) -); - -COMMENT ON TABLE services IS 'Supported blockchain services from the Pocket Network'; -COMMENT ON COLUMN services.compute_units_per_relay IS 'Cost in compute units for each relay'; -COMMENT ON COLUMN services.service_domains IS 'Valid domains for this service'; - --- Service fallbacks table --- Defines the set of fallbacks per service for offchain processing. -CREATE TABLE service_fallbacks ( - service_fallback_id SERIAL PRIMARY KEY, - service_id VARCHAR(42) NOT NULL, - fallback_url VARCHAR(255) NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (service_id) REFERENCES services(service_id) ON DELETE CASCADE -); - -COMMENT ON TABLE service_fallbacks IS 'Fallback URLs for services when primary endpoints fail'; - --- Service endpoints table --- Defines the active list of endpoints per Service. See: endpoint_type for more information -CREATE TABLE service_endpoints ( - endpoint_id SERIAL PRIMARY KEY, - service_id VARCHAR(42) NOT NULL, - endpoint_type endpoint_type, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (service_id) REFERENCES services(service_id) ON DELETE CASCADE -); - -COMMENT ON TABLE service_endpoints IS 'Available endpoint types for each service'; - --- ============================================================================ --- ONCHAIN APPLICATIONS --- ============================================================================ - --- Applications table --- Stores the onchain applications for relay processing. Includes Secret Keys -CREATE TABLE applications ( - application_address VARCHAR(50) PRIMARY KEY, - gateway_address VARCHAR(50) NOT NULL, - service_id VARCHAR(42) NOT NULL, - stake_amount BIGINT, - stake_denom VARCHAR(15), - application_private_key_hex VARCHAR(64), -- TODO_IMPROVE: Store private keys in encrypted manner and not in plain text. - network_id VARCHAR(42) NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (gateway_address) REFERENCES gateways(gateway_address), - FOREIGN KEY (service_id) REFERENCES services(service_id), - FOREIGN KEY (network_id) REFERENCES networks(network_id) -); - -COMMENT ON TABLE applications IS 'Onchain applications for processing relays through the network'; -COMMENT ON COLUMN applications.application_address IS 'Blockchain address of the application'; - --- ============================================================================ --- ACCESS CONTROL AND SECURITY --- ============================================================================ - --- Portal application allowlists table --- Sets access controls to Portal Applications based on allowlist_type -CREATE TABLE portal_application_allowlists ( - id SERIAL PRIMARY KEY, - portal_application_id VARCHAR(36) NOT NULL, - type allowlist_type, - value VARCHAR(255), - service_id VARCHAR(42), - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (portal_application_id) REFERENCES portal_applications(portal_application_id) ON DELETE CASCADE, - FOREIGN KEY (service_id) REFERENCES services(service_id) -); - -COMMENT ON TABLE portal_application_allowlists IS 'Access control lists for portal applications'; - --- Supplier blocklist table --- Permanently block specific onchain suppliers from processing traffic -CREATE TABLE supplier_blocklist ( - id SERIAL PRIMARY KEY, - supplier_address VARCHAR(50), - network_id VARCHAR(42) NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (network_id) REFERENCES networks(network_id) -); - -COMMENT ON TABLE supplier_blocklist IS 'Blocked supplier addresses to prevent processing'; - --- Domain blocklist table --- Permanently block traffic from being processed by certain domains -CREATE TABLE domain_blocklist ( - id SERIAL PRIMARY KEY, - domain VARCHAR(169), - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -COMMENT ON TABLE domain_blocklist IS 'Blocked domains to prevent traffic processing'; - --- Crypto address blocklist table --- Permanently block traffic that contains specific addresses. --- !!! IMPORTANT FOR COMPLIANCE !!! -CREATE TABLE crypto_address_blocklist ( - id SERIAL PRIMARY KEY, - address VARCHAR(169), - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -COMMENT ON TABLE crypto_address_blocklist IS 'Blocked cryptocurrency addresses for compliance requirements'; - --- ============================================================================ --- INITIAL DATA --- ============================================================================ - --- Insert default network IDs (Pocket and associated testnets) -INSERT INTO networks (network_id) VALUES - ('pocket'), - ('pocket-beta'), - ('pocket-alpha'); - --- ============================================================================ --- INDEXES --- ============================================================================ - --- Core table indexes -CREATE INDEX idx_gateways_network_id ON gateways(network_id); -CREATE INDEX idx_services_network_id ON services(network_id); -CREATE INDEX idx_services_owner ON services(service_owner_address); -CREATE INDEX idx_service_fallbacks_service_id ON service_fallbacks(service_id); -CREATE INDEX idx_service_endpoints_service_id ON service_endpoints(service_id); -CREATE INDEX idx_applications_gateway ON applications(gateway_address); -CREATE INDEX idx_applications_service ON applications(service_id); -CREATE INDEX idx_applications_network ON applications(network_id); -CREATE INDEX idx_portal_applications_account ON portal_applications(portal_account_id); -CREATE INDEX idx_portal_application_allowlists_app ON portal_application_allowlists(portal_application_id); -CREATE INDEX idx_portal_account_rbac_account ON portal_account_rbac(portal_account_id); -CREATE INDEX idx_portal_account_rbac_user ON portal_account_rbac(portal_user_id); -CREATE INDEX idx_portal_application_rbac_app ON portal_application_rbac(portal_application_id); -CREATE INDEX idx_portal_application_rbac_user ON portal_application_rbac(portal_user_id); -CREATE INDEX idx_supplier_blocklist_network ON supplier_blocklist(network_id); -CREATE INDEX idx_contacts_organization ON contacts(organization_id); -CREATE INDEX idx_organization_tags_org ON organization_tags(organization_id); - --- Additional performance indexes -CREATE INDEX idx_portal_users_email ON portal_users(portal_user_email) WHERE deleted_at IS NULL; -CREATE INDEX idx_portal_accounts_org ON portal_accounts(organization_id); -CREATE INDEX idx_portal_accounts_stripe ON portal_accounts(stripe_subscription_id) - WHERE stripe_subscription_id IS NOT NULL; -CREATE INDEX idx_services_active ON services(service_id) WHERE active = TRUE AND deleted_at IS NULL; -CREATE INDEX idx_portal_applications_active ON portal_applications(portal_account_id) - WHERE deleted_at IS NULL; diff --git a/portal-db/schema/003_postgrest_transactions.sql b/portal-db/schema/003_postgrest_transactions.sql deleted file mode 100644 index 1d11b617e..000000000 --- a/portal-db/schema/003_postgrest_transactions.sql +++ /dev/null @@ -1,289 +0,0 @@ --- This file contains transactions functions for performing complex database operations --- such as creating a new portal application and its associated data - --- ============================================================================ --- SECRET KEY GENERATION FUNCTION --- ============================================================================ --- --- Generates cryptographically secure secret keys for portal applications. --- This function is separated for reusability and to centralize key generation logic. --- --- References: --- - PostgreSQL UUID Generation: https://www.postgresql.org/docs/current/functions-uuid.html --- - PostgREST Security Definer: https://docs.postgrest.org/en/v13/explanations/db_authz.html#security-definer --- --- Security Considerations: --- - Uses gen_random_uuid() which provides 122 bits of entropy --- - Returns both plain text key (for immediate use) and "hash" (for storage) --- - TODO_IMPROVE: Implement proper cryptographic hashing (PBKDF2, Argon2, bcrypt) --- - TODO_IMPROVE: Consider using PostgreSQL's pgcrypto extension --- -CREATE OR REPLACE FUNCTION public.generate_portal_app_secret() -RETURNS JSON AS $$ -DECLARE - v_secret_key TEXT; - v_secret_key_hash VARCHAR(255); -BEGIN - -- Generate a cryptographically secure secret key - -- Using gen_random_uuid() provides 122 bits of entropy which is suitable for API keys - -- Format: Remove hyphens to create a 32-character hex string - v_secret_key := replace(gen_random_uuid()::text, '-', ''); - - -- For now, we're storing the "hash" as the plain key since the schema comment - -- indicates this needs improvement. In production, this should be properly hashed. - -- TODO_IMPROVE: Use a proper key derivation function like PBKDF2 or Argon2 - -- TODO_IMPROVE: Consider using PostgreSQL's pgcrypto extension for better hashing - v_secret_key_hash := v_secret_key; - - -- Return both the plain key (for immediate use) and hash (for storage) - RETURN json_build_object( - 'secret_key', v_secret_key, - 'secret_key_hash', v_secret_key_hash, - 'generated_at', CURRENT_TIMESTAMP, - 'entropy_bits', 122, - 'algorithm', 'UUID v4 (hex formatted)' - ); -END; -$$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; - --- Remove public execute permission to prevent PostgREST from exposing this as an API endpoint --- This function is for internal use by other database functions only -REVOKE EXECUTE ON FUNCTION public.generate_portal_app_secret FROM PUBLIC; - --- Do NOT grant to authenticated role - this keeps it private --- Only functions with SECURITY DEFINER can call this function - -COMMENT ON FUNCTION public.generate_portal_app_secret IS -'INTERNAL USE ONLY: Generates cryptographically secure secret keys for portal applications. -Returns both plain text key and storage hash. -Used internally by create_portal_application function. -NOT exposed via PostgREST API.'; - --- ============================================================================ --- CREATE PORTAL APPLICATION FUNCTION --- ============================================================================ --- --- This function creates a portal application with all associated data in a single --- atomic transaction. This approach follows PostgREST best practices for complex --- multi-table operations that require ACID guarantees. --- --- References: --- - PostgREST Transactions: https://docs.postgrest.org/en/v13/references/transactions.html --- - PostgreSQL UUID Generation: https://www.postgresql.org/docs/current/functions-uuid.html --- - PostgreSQL Security Functions: https://www.postgresql.org/docs/current/functions-info.html --- --- Security Considerations: --- - Uses SECURITY DEFINER to execute with function owner privileges --- - Validates that user belongs to the account before granting access --- - Generates cryptographically secure API keys using gen_random_uuid() --- - TODO_IMPROVE: Should hash secret keys using proper cryptographic functions --- -CREATE OR REPLACE FUNCTION public.create_portal_application( - p_portal_account_id VARCHAR(36), - p_portal_user_id VARCHAR(36), - p_portal_application_name VARCHAR(42) DEFAULT NULL, - p_emoji VARCHAR(16) DEFAULT NULL, - p_portal_application_user_limit INT DEFAULT NULL, - p_portal_application_user_limit_interval plan_interval DEFAULT NULL, - p_portal_application_user_limit_rps INT DEFAULT NULL, - p_portal_application_description VARCHAR(255) DEFAULT NULL, - p_favorite_service_ids VARCHAR[] DEFAULT NULL, - p_secret_key_required TEXT DEFAULT 'false' -) RETURNS JSON AS $$ -DECLARE - v_new_app_id VARCHAR(36); - v_secret_data JSON; - v_secret_key TEXT; - v_secret_key_hash VARCHAR(255); - v_user_is_account_member BOOLEAN := FALSE; - v_secret_key_required_bool BOOLEAN; - v_result JSON; -BEGIN - -- ======================================================================== - -- VALIDATION PHASE - -- ======================================================================== - - -- Convert text parameter to boolean for internal use - -- This avoids OpenAPI/SDK generation issues with boolean parameters - v_secret_key_required_bool := CASE - WHEN LOWER(p_secret_key_required) IN ('true', 't', '1', 'yes', 'y') THEN TRUE - ELSE FALSE - END; - - -- Validate required parameters - -- PostgreSQL will enforce NOT NULL constraints, but we provide better error messages - IF p_portal_account_id IS NULL THEN - RAISE EXCEPTION 'portal_account_id is required' - USING ERRCODE = '23502', -- not_null_violation - HINT = 'Provide a valid portal account ID'; - END IF; - - IF p_portal_user_id IS NULL THEN - RAISE EXCEPTION 'portal_user_id is required' - USING ERRCODE = '23502', - HINT = 'Provide a valid portal user ID'; - END IF; - - -- Verify the account exists - -- This will throw a foreign key constraint error if account doesn't exist - IF NOT EXISTS (SELECT 1 FROM portal_accounts WHERE portal_account_id = p_portal_account_id) THEN - RAISE EXCEPTION 'Portal account not found: %', p_portal_account_id - USING ERRCODE = '23503', -- foreign_key_violation - HINT = 'Ensure the portal account exists before creating applications'; - END IF; - - -- Verify the user exists and has access to this account - -- This implements the business rule that users must be account members - -- before they can create applications within that account - SELECT EXISTS ( - SELECT 1 FROM portal_account_rbac - WHERE portal_account_id = p_portal_account_id - AND portal_user_id = p_portal_user_id - AND user_joined_account = TRUE - ) INTO v_user_is_account_member; - - IF NOT v_user_is_account_member THEN - RAISE EXCEPTION 'User % is not a member of account %', p_portal_user_id, p_portal_account_id - USING ERRCODE = '42501', -- insufficient_privilege - HINT = 'User must be a member of the account to create applications'; - END IF; - - -- ======================================================================== - -- SECRET KEY GENERATION - -- ======================================================================== - - -- Use the dedicated secret generation function - -- This centralizes key generation logic and makes it reusable - SELECT public.generate_portal_app_secret() INTO v_secret_data; - - -- Extract the generated key and hash from the JSON response - v_secret_key := v_secret_data->>'secret_key'; - v_secret_key_hash := v_secret_data->>'secret_key_hash'; - - -- ======================================================================== - -- APPLICATION CREATION PHASE - -- ======================================================================== - - -- Generate unique application ID - -- gen_random_uuid() provides a UUID v4 with extremely low collision probability - -- The PRIMARY KEY constraint ensures database-level uniqueness - v_new_app_id := gen_random_uuid()::text; - - -- Insert the portal application - -- All optional fields use their database defaults if not provided - -- The function parameters allow overriding defaults when needed - INSERT INTO portal_applications ( - portal_application_id, - portal_account_id, - portal_application_name, - emoji, - portal_application_user_limit, - portal_application_user_limit_interval, - portal_application_user_limit_rps, - portal_application_description, - favorite_service_ids, - secret_key_hash, - secret_key_required, - created_at, - updated_at - ) VALUES ( - v_new_app_id, - p_portal_account_id, - p_portal_application_name, - p_emoji, - p_portal_application_user_limit, - p_portal_application_user_limit_interval, - p_portal_application_user_limit_rps, - p_portal_application_description, - p_favorite_service_ids, - v_secret_key_hash, - v_secret_key_required_bool, - CURRENT_TIMESTAMP, - CURRENT_TIMESTAMP - ); - - -- ======================================================================== - -- RBAC SETUP PHASE - -- ======================================================================== - - -- Grant the creating user access to the new application - -- This follows the principle that application creators should have access to their apps - -- The unique constraint prevents duplicate entries - INSERT INTO portal_application_rbac ( - portal_application_id, - portal_user_id, - created_at, - updated_at - ) VALUES ( - v_new_app_id, - p_portal_user_id, - CURRENT_TIMESTAMP, - CURRENT_TIMESTAMP - ); - - -- ======================================================================== - -- RESPONSE GENERATION - -- ======================================================================== - - -- Build JSON response with all relevant information - -- Include the secret key in the response since this is the only time it can be viewed - -- TODO_IMPROVE: When proper hashing is implemented, return the secret key only once - SELECT json_build_object( - 'portal_application_id', v_new_app_id, - 'portal_account_id', p_portal_account_id, - 'portal_application_name', p_portal_application_name, - 'secret_key', v_secret_key, - 'secret_key_required', v_secret_key_required_bool, - 'created_at', CURRENT_TIMESTAMP, - 'message', 'Portal application created successfully', - 'warning', 'Store the secret key securely - it cannot be retrieved again' - ) INTO v_result; - - RETURN v_result; - -EXCEPTION - WHEN unique_violation THEN - -- Handle the rare case of UUID collision or constraint violations - RAISE EXCEPTION 'Application creation failed due to constraint violation: %', SQLERRM - USING ERRCODE = '23505', - HINT = 'This may be due to a duplicate name or UUID collision. Try again.'; - - WHEN foreign_key_violation THEN - -- Handle cases where referenced records don't exist - RAISE EXCEPTION 'Application creation failed due to invalid reference: %', SQLERRM - USING ERRCODE = '23503', - HINT = 'Ensure all referenced accounts and users exist.'; - - WHEN check_violation THEN - -- Handle constraint check failures (e.g., negative limits) - RAISE EXCEPTION 'Application creation failed due to invalid data: %', SQLERRM - USING ERRCODE = '23514', - HINT = 'Check that all numeric values are within valid ranges.'; - - WHEN OTHERS THEN - -- Handle any other errors with context - RAISE EXCEPTION 'Unexpected error during application creation: %', SQLERRM - USING ERRCODE = SQLSTATE, - HINT = 'Contact support if this error persists.'; -END; -$$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; - --- Set function ownership and permissions --- SECURITY DEFINER allows the function to run with elevated privileges --- This is necessary to ensure the function can access all required tables --- See: https://www.postgresql.org/docs/current/sql-createfunction.html#SQL-CREATEFUNCTION-SECURITY - --- Grant execute permission to authenticated users --- This assumes your PostgREST setup uses an 'authenticated' role for logged-in users --- Adjust the role name based on your authentication setup -GRANT EXECUTE ON FUNCTION public.create_portal_application TO authenticated; - --- Note: The function should be publicly executable for PostgREST to expose it --- PostgREST requires functions to have appropriate permissions to be exposed as RPC endpoints - --- Add function comment for documentation -COMMENT ON FUNCTION public.create_portal_application IS -'Creates a portal application with all associated RBAC entries in a single atomic transaction. -Validates user membership in the account before creation. -Returns the application details including the generated secret key. -This function is exposed via PostgREST as POST /rpc/create_portal_application'; diff --git a/portal-db/sdk/go/README.md b/portal-db/sdk/go/README.md index cb30ca6fc..e28c93897 100644 --- a/portal-db/sdk/go/README.md +++ b/portal-db/sdk/go/README.md @@ -5,7 +5,7 @@ This Go SDK provides a type-safe client for the Portal DB API, generated using [ ## Installation ```bash -go get github.com/grove/path/portal-db/sdk/go +go get github.com/buildwithgrove/path/portal-db/sdk/go ``` ## Quick Start @@ -18,7 +18,7 @@ import ( "fmt" "log" - "github.com/grove/path/portal-db/sdk/go" + "github.com/buildwithgrove/path/portal-db/sdk/go" ) func main() { @@ -52,7 +52,7 @@ import ( "context" "net/http" - "github.com/grove/path/portal-db/sdk/go" + "github.com/buildwithgrove/path/portal-db/sdk/go" ) func authenticatedExample() { diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go index edbe4e2c0..e4570cd62 100644 --- a/portal-db/sdk/go/client.go +++ b/portal-db/sdk/go/client.go @@ -96,54 +96,6 @@ type ClientInterface interface { // Get request Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteApplications request - DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApplications request - GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchApplicationsWithBody request with any body - PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApplicationsWithBody request with any body - PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteGateways request - DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetGateways request - GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchGatewaysWithBody request with any body - PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostGatewaysWithBody request with any body - PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteNetworks request DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -192,6 +144,30 @@ type ClientInterface interface { PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePortalAccountRbac request + DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalAccountRbac request + GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalAccountRbacWithBody request with any body + PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalAccountRbacWithBody request with any body + PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePortalAccounts request DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -216,6 +192,30 @@ type ClientInterface interface { PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePortalApplicationRbac request + DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalApplicationRbac request + GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalApplicationRbacWithBody request with any body + PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalApplicationRbacWithBody request with any body + PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePortalApplications request DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -264,29 +264,77 @@ type ClientInterface interface { PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetRpcCreatePortalApplication request - GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetRpcArmor request + GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcArmorWithBody request with any body + PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcDearmor request + GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcDearmorWithBody request with any body + PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostRpcCreatePortalApplicationWithBody request with any body - PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetRpcGenRandomUuid request + GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostRpcGenRandomUuidWithBody request with any body + PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetRpcMe request - GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostRpcMeWithBody request with any body - PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetRpcGenSalt request + GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostRpcGenSaltWithBody request with any body + PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcPgpArmorHeaders request + GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcPgpArmorHeadersWithBody request with any body + PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRpcPgpKeyId request + GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostRpcPgpKeyIdWithBody request with any body + PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteServiceEndpoints request DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -373,8 +421,8 @@ func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http. return c.Client.Do(req) } -func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApplicationsRequest(c.Server, params) +func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteNetworksRequest(c.Server, params) if err != nil { return nil, err } @@ -385,8 +433,8 @@ func (c *Client) DeleteApplications(ctx context.Context, params *DeleteApplicati return c.Client.Do(req) } -func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApplicationsRequest(c.Server, params) +func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworksRequest(c.Server, params) if err != nil { return nil, err } @@ -397,8 +445,8 @@ func (c *Client) GetApplications(ctx context.Context, params *GetApplicationsPar return c.Client.Do(req) } -func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -409,8 +457,8 @@ func (c *Client) PatchApplicationsWithBody(ctx context.Context, params *PatchApp return c.Client.Do(req) } -func (c *Client) PatchApplications(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequest(c.Server, params, body) +func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequest(c.Server, params, body) if err != nil { return nil, err } @@ -421,8 +469,8 @@ func (c *Client) PatchApplications(ctx context.Context, params *PatchApplication return c.Client.Do(req) } -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -433,8 +481,8 @@ func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -445,8 +493,8 @@ func (c *Client) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStri return c.Client.Do(req) } -func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -457,8 +505,8 @@ func (c *Client) PostApplicationsWithBody(ctx context.Context, params *PostAppli return c.Client.Do(req) } -func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequest(c.Server, params, body) +func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequest(c.Server, params, body) if err != nil { return nil, err } @@ -469,8 +517,8 @@ func (c *Client) PostApplications(ctx context.Context, params *PostApplicationsP return c.Client.Do(req) } -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -481,8 +529,8 @@ func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx c return c.Client.Do(req) } -func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -493,8 +541,8 @@ func (c *Client) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrip return c.Client.Do(req) } -func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteGatewaysRequest(c.Server, params) +func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrganizationsRequest(c.Server, params) if err != nil { return nil, err } @@ -505,8 +553,8 @@ func (c *Client) DeleteGateways(ctx context.Context, params *DeleteGatewaysParam return c.Client.Do(req) } -func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGatewaysRequest(c.Server, params) +func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationsRequest(c.Server, params) if err != nil { return nil, err } @@ -517,8 +565,8 @@ func (c *Client) GetGateways(ctx context.Context, params *GetGatewaysParams, req return c.Client.Do(req) } -func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -529,8 +577,8 @@ func (c *Client) PatchGatewaysWithBody(ctx context.Context, params *PatchGateway return c.Client.Do(req) } -func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequest(c.Server, params, body) +func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -541,8 +589,8 @@ func (c *Client) PatchGateways(ctx context.Context, params *PatchGatewaysParams, return c.Client.Do(req) } -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -553,8 +601,8 @@ func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx cont return c.Client.Do(req) } -func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -565,8 +613,8 @@ func (c *Client) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStripped return c.Client.Do(req) } -func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -577,8 +625,8 @@ func (c *Client) PostGatewaysWithBody(ctx context.Context, params *PostGatewaysP return c.Client.Do(req) } -func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequest(c.Server, params, body) +func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -589,8 +637,8 @@ func (c *Client) PostGateways(ctx context.Context, params *PostGatewaysParams, b return c.Client.Do(req) } -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -601,8 +649,8 @@ func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx conte return c.Client.Do(req) } -func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -613,8 +661,8 @@ func (c *Client) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedB return c.Client.Do(req) } -func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteNetworksRequest(c.Server, params) +func (c *Client) DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -625,8 +673,8 @@ func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParam return c.Client.Do(req) } -func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetNetworksRequest(c.Server, params) +func (c *Client) GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -637,8 +685,8 @@ func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, req return c.Client.Do(req) } -func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -649,8 +697,8 @@ func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetwork return c.Client.Do(req) } -func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequest(c.Server, params, body) +func (c *Client) PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -661,8 +709,8 @@ func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, return c.Client.Do(req) } -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -673,8 +721,8 @@ func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx cont return c.Client.Do(req) } -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -685,8 +733,8 @@ func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStripped return c.Client.Do(req) } -func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -697,8 +745,8 @@ func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksP return c.Client.Do(req) } -func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequest(c.Server, params, body) +func (c *Client) PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -709,8 +757,8 @@ func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, b return c.Client.Do(req) } -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -721,8 +769,8 @@ func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx conte return c.Client.Do(req) } -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -733,8 +781,8 @@ func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedB return c.Client.Do(req) } -func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteOrganizationsRequest(c.Server, params) +func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountsRequest(c.Server, params) if err != nil { return nil, err } @@ -745,8 +793,8 @@ func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganiza return c.Client.Do(req) } -func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationsRequest(c.Server, params) +func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountsRequest(c.Server, params) if err != nil { return nil, err } @@ -757,8 +805,8 @@ func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsP return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -769,8 +817,8 @@ func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOr return c.Client.Do(req) } -func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequest(c.Server, params, body) +func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -781,8 +829,8 @@ func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizati return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -793,8 +841,8 @@ func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -805,8 +853,8 @@ func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStr return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -817,8 +865,8 @@ func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrga return c.Client.Do(req) } -func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequest(c.Server, params, body) +func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -829,8 +877,8 @@ func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganization return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -841,8 +889,8 @@ func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -853,8 +901,8 @@ func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStri return c.Client.Do(req) } -func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalAccountsRequest(c.Server, params) +func (c *Client) DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalApplicationRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -865,8 +913,8 @@ func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalA return c.Client.Do(req) } -func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalAccountsRequest(c.Server, params) +func (c *Client) GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalApplicationRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -877,8 +925,8 @@ func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccount return c.Client.Do(req) } -func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -889,8 +937,8 @@ func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchP return c.Client.Do(req) } -func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequest(c.Server, params, body) +func (c *Client) PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -901,8 +949,8 @@ func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAcc return c.Client.Do(req) } -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -913,8 +961,8 @@ func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ct return c.Client.Do(req) } -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -925,8 +973,8 @@ func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsSt return c.Client.Do(req) } -func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -937,8 +985,8 @@ func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPor return c.Client.Do(req) } -func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequest(c.Server, params, body) +func (c *Client) PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -949,8 +997,8 @@ func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccou return c.Client.Do(req) } -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -961,8 +1009,8 @@ func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1213,8 +1261,8 @@ func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStripp return c.Client.Do(req) } -func (c *Client) GetRpcCreatePortalApplication(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcCreatePortalApplicationRequest(c.Server, params) +func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcArmorRequest(c.Server, params) if err != nil { return nil, err } @@ -1225,8 +1273,8 @@ func (c *Client) GetRpcCreatePortalApplication(ctx context.Context, params *GetR return c.Client.Do(req) } -func (c *Client) PostRpcCreatePortalApplicationWithBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1237,8 +1285,8 @@ func (c *Client) PostRpcCreatePortalApplicationWithBody(ctx context.Context, par return c.Client.Do(req) } -func (c *Client) PostRpcCreatePortalApplication(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequest(c.Server, params, body) +func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1249,8 +1297,8 @@ func (c *Client) PostRpcCreatePortalApplication(ctx context.Context, params *Pos return c.Client.Do(req) } -func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1261,8 +1309,8 @@ func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlus return c.Client.Do(req) } -func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1273,8 +1321,8 @@ func (c *Client) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlus return c.Client.Do(req) } -func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcMeRequest(c.Server) +func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcDearmorRequest(c.Server, params) if err != nil { return nil, err } @@ -1285,8 +1333,8 @@ func (c *Client) GetRpcMe(ctx context.Context, reqEditors ...RequestEditorFn) (* return c.Client.Do(req) } -func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1297,8 +1345,8 @@ func (c *Client) PostRpcMeWithBody(ctx context.Context, params *PostRpcMeParams, return c.Client.Do(req) } -func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequest(c.Server, params, body) +func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1309,8 +1357,8 @@ func (c *Client) PostRpcMe(ctx context.Context, params *PostRpcMeParams, body Po return c.Client.Do(req) } -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1321,8 +1369,8 @@ func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx context. return c.Client.Do(req) } -func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1333,8 +1381,8 @@ func (c *Client) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody return c.Client.Do(req) } -func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceEndpointsRequest(c.Server, params) +func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenRandomUuidRequest(c.Server) if err != nil { return nil, err } @@ -1345,8 +1393,8 @@ func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServi return c.Client.Do(req) } -func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceEndpointsRequest(c.Server, params) +func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1357,8 +1405,8 @@ func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndp return c.Client.Do(req) } -func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1369,8 +1417,8 @@ func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *Patc return c.Client.Do(req) } -func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1381,8 +1429,8 @@ func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchService return c.Client.Do(req) } -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1393,8 +1441,8 @@ func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody( return c.Client.Do(req) } -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenSaltRequest(c.Server, params) if err != nil { return nil, err } @@ -1405,8 +1453,8 @@ func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNulls return c.Client.Do(req) } -func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1417,8 +1465,8 @@ func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostS return c.Client.Do(req) } -func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequest(c.Server, params, body) +func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1429,8 +1477,8 @@ func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEn return c.Client.Do(req) } -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1441,8 +1489,8 @@ func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(c return c.Client.Do(req) } -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1453,8 +1501,8 @@ func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsS return c.Client.Do(req) } -func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceFallbacksRequest(c.Server, params) +func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpArmorHeadersRequest(c.Server, params) if err != nil { return nil, err } @@ -1465,8 +1513,8 @@ func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServi return c.Client.Do(req) } -func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceFallbacksRequest(c.Server, params) +func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1477,8 +1525,8 @@ func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFall return c.Client.Do(req) } -func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1489,8 +1537,8 @@ func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *Patc return c.Client.Do(req) } -func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1501,8 +1549,8 @@ func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchService return c.Client.Do(req) } -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1513,8 +1561,8 @@ func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody( return c.Client.Do(req) } -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpKeyIdRequest(c.Server, params) if err != nil { return nil, err } @@ -1525,8 +1573,8 @@ func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNulls return c.Client.Do(req) } -func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1537,8 +1585,8 @@ func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostS return c.Client.Do(req) } -func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequest(c.Server, params, body) +func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1549,8 +1597,8 @@ func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFa return c.Client.Do(req) } -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1561,8 +1609,8 @@ func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(c return c.Client.Do(req) } -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1573,8 +1621,8 @@ func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsS return c.Client.Do(req) } -func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServicesRequest(c.Server, params) +func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceEndpointsRequest(c.Server, params) if err != nil { return nil, err } @@ -1585,8 +1633,8 @@ func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParam return c.Client.Do(req) } -func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServicesRequest(c.Server, params) +func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceEndpointsRequest(c.Server, params) if err != nil { return nil, err } @@ -1597,8 +1645,8 @@ func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, req return c.Client.Do(req) } -func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1609,8 +1657,8 @@ func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchService return c.Client.Do(req) } -func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequest(c.Server, params, body) +func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1621,8 +1669,8 @@ func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, return c.Client.Do(req) } -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1633,8 +1681,8 @@ func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx cont return c.Client.Do(req) } -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -1645,8 +1693,8 @@ func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStripped return c.Client.Do(req) } -func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -1657,8 +1705,8 @@ func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesP return c.Client.Do(req) } -func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequest(c.Server, params, body) +func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -1669,8 +1717,248 @@ func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, b return c.Client.Do(req) } -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -1720,8 +2008,8 @@ func NewGetRequest(server string) (*http.Request, error) { return req, nil } -// NewDeleteApplicationsRequest generates requests for DeleteApplications -func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParams) (*http.Request, error) { +// NewDeleteNetworksRequest generates requests for DeleteNetworks +func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1729,7 +2017,7 @@ func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParam return nil, err } - operationPath := fmt.Sprintf("/applications") + operationPath := fmt.Sprintf("/networks") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1742,102 +2030,6 @@ func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParam if params != nil { queryValues := queryURL.Query() - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.NetworkId != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { @@ -1854,38 +2046,6 @@ func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParam } - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() } @@ -1912,8 +2072,8 @@ func NewDeleteApplicationsRequest(server string, params *DeleteApplicationsParam return req, nil } -// NewGetApplicationsRequest generates requests for GetApplications -func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*http.Request, error) { +// NewGetNetworksRequest generates requests for GetNetworks +func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1921,7 +2081,7 @@ func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*h return nil, err } - operationPath := fmt.Sprintf("/applications") + operationPath := fmt.Sprintf("/networks") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1932,139 +2092,11 @@ func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*h } if params != nil { - queryValues := queryURL.Query() - - if params.ApplicationAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GatewayAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeAmount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StakeDenom != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ApplicationPrivateKeyHex != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + queryValues := queryURL.Query() - if params.UpdatedAt != nil { + if params.NetworkId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2190,41 +2222,41 @@ func NewGetApplicationsRequest(server string, params *GetApplicationsParams) (*h return req, nil } -// NewPatchApplicationsRequest calls the generic PatchApplications builder with application/json body -func NewPatchApplicationsRequest(server string, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody) (*http.Request, error) { +// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body +func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/json", bodyReader) + return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) } -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPatchApplicationsRequestWithBody generates requests for PatchApplications with any type of body -func NewPatchApplicationsRequestWithBody(server string, params *PatchApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body +func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2232,7 +2264,7 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication return nil, err } - operationPath := fmt.Sprintf("/applications") + operationPath := fmt.Sprintf("/networks") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2245,9 +2277,9 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication if params != nil { queryValues := queryURL.Query() - if params.ApplicationAddress != nil { + if params.NetworkId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_address", runtime.ParamLocationQuery, *params.ApplicationAddress); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2261,41 +2293,92 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - if params.GatewayAddress != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.ServiceId != nil { + if params != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.StakeAmount != nil { + } + + return req, nil +} + +// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body +func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body +func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2309,25 +2392,59 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - if params.StakeDenom != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.ApplicationPrivateKeyHex != nil { + } + + return req, nil +} + +// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations +func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "application_private_key_hex", runtime.ParamLocationQuery, *params.ApplicationPrivateKeyHex); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2341,9 +2458,9 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - if params.NetworkId != nil { + if params.OrganizationName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2357,9 +2474,9 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - if params.CreatedAt != nil { + if params.DeletedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2373,9 +2490,9 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - if params.UpdatedAt != nil { + if params.CreatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2389,92 +2506,9 @@ func NewPatchApplicationsRequestWithBody(server string, params *PatchApplication } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostApplicationsRequest calls the generic PostApplications builder with application/json body -func NewPostApplicationsRequest(server string, params *PostApplicationsParams, body PostApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostApplications builder with application/vnd.pgrst.object+json body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostApplicationsRequestWithBody generates requests for PostApplications with any type of body -func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { + if params.UpdatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2491,13 +2525,11 @@ func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsP queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - if params != nil { if params.Prefer != nil { @@ -2516,8 +2548,8 @@ func NewPostApplicationsRequestWithBody(server string, params *PostApplicationsP return req, nil } -// NewDeleteGatewaysRequest generates requests for DeleteGateways -func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*http.Request, error) { +// NewGetOrganizationsRequest generates requests for GetOrganizations +func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2525,7 +2557,7 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt return nil, err } - operationPath := fmt.Sprintf("/gateways") + operationPath := fmt.Sprintf("/organizations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2538,9 +2570,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt if params != nil { queryValues := queryURL.Query() - if params.GatewayAddress != nil { + if params.OrganizationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2554,9 +2586,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.StakeAmount != nil { + if params.OrganizationName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2570,9 +2602,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.StakeDenom != nil { + if params.DeletedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2586,9 +2618,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.NetworkId != nil { + if params.CreatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2602,9 +2634,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.GatewayPrivateKeyHex != nil { + if params.UpdatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2618,9 +2650,9 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.CreatedAt != nil { + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2634,9 +2666,41 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt } - if params.UpdatedAt != nil { + if params.Order != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2653,22 +2717,44 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } if params != nil { - if params.Prefer != nil { + if params.Range != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam0) + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) } } @@ -2676,8 +2762,41 @@ func NewDeleteGatewaysRequest(server string, params *DeleteGatewaysParams) (*htt return req, nil } -// NewGetGatewaysRequest generates requests for GetGateways -func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Request, error) { +// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body +func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body +func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2685,7 +2804,7 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/gateways") + operationPath := fmt.Sprintf("/organizations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2698,9 +2817,25 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ if params != nil { queryValues := queryURL.Query() - if params.GatewayAddress != nil { + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2714,9 +2849,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.StakeAmount != nil { + if params.DeletedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2730,9 +2865,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.StakeDenom != nil { + if params.CreatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2746,9 +2881,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.NetworkId != nil { + if params.UpdatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2762,9 +2897,92 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.GatewayPrivateKeyHex != nil { + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body +func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body +func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2778,25 +2996,59 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.CreatedAt != nil { + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewDeletePortalAccountRbacRequest generates requests for DeletePortalAccountRbac +func NewDeletePortalAccountRbacRequest(server string, params *DeletePortalAccountRbacParams) (*http.Request, error) { + var err error - if params.UpdatedAt != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + operationPath := fmt.Sprintf("/portal_account_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2810,9 +3062,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.Select != nil { + if params.PortalAccountId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2826,9 +3078,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.Order != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2842,9 +3094,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.Offset != nil { + if params.RoleName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2858,9 +3110,9 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ } - if params.Limit != nil { + if params.UserJoinedAccount != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2877,44 +3129,22 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } if params != nil { - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - if params.Prefer != nil { - var headerParam2 string + var headerParam0 string - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam2) + req.Header.Set("Prefer", headerParam0) } } @@ -2922,41 +3152,8 @@ func NewGetGatewaysRequest(server string, params *GetGatewaysParams) (*http.Requ return req, nil } -// NewPatchGatewaysRequest calls the generic PatchGateways builder with application/json body -func NewPatchGatewaysRequest(server string, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchGatewaysRequestWithBody generates requests for PatchGateways with any type of body -func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { +// NewGetPortalAccountRbacRequest generates requests for GetPortalAccountRbac +func NewGetPortalAccountRbacRequest(server string, params *GetPortalAccountRbacParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2964,7 +3161,7 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, return nil, err } - operationPath := fmt.Sprintf("/gateways") + operationPath := fmt.Sprintf("/portal_account_rbac") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2977,9 +3174,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, if params != nil { queryValues := queryURL.Query() - if params.GatewayAddress != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_address", runtime.ParamLocationQuery, *params.GatewayAddress); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2993,9 +3190,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.StakeAmount != nil { + if params.PortalAccountId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_amount", runtime.ParamLocationQuery, *params.StakeAmount); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3009,9 +3206,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.StakeDenom != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stake_denom", runtime.ParamLocationQuery, *params.StakeDenom); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3025,9 +3222,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.NetworkId != nil { + if params.RoleName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3041,9 +3238,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.GatewayPrivateKeyHex != nil { + if params.UserJoinedAccount != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gateway_private_key_hex", runtime.ParamLocationQuery, *params.GatewayPrivateKeyHex); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3057,9 +3254,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.CreatedAt != nil { + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3073,9 +3270,9 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - if params.UpdatedAt != nil { + if params.Order != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3089,92 +3286,25 @@ func NewPatchGatewaysRequestWithBody(server string, params *PatchGatewaysParams, } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string + if params.Offset != nil { - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - req.Header.Set("Prefer", headerParam0) } - } - - return req, nil -} - -// NewPostGatewaysRequest calls the generic PostGateways builder with application/json body -func NewPostGatewaysRequest(server string, params *PostGatewaysParams, body PostGatewaysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostGateways builder with application/vnd.pgrst.object+json body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostGateways builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostGatewaysRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostGatewaysRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostGatewaysRequestWithBody generates requests for PostGateways with any type of body -func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gateways") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3191,88 +3321,44 @@ func NewPostGatewaysRequestWithBody(server string, params *PostGatewaysParams, c queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - if params != nil { - if params.Prefer != nil { + if params.Range != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteNetworksRequest generates requests for DeleteNetworks -func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - + req.Header.Set("Range", headerParam0) } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params.RangeUnit != nil { + var headerParam1 string - if params != nil { + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } if params.Prefer != nil { - var headerParam0 string + var headerParam2 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam0) + req.Header.Set("Prefer", headerParam2) } } @@ -3280,8 +3366,41 @@ func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*htt return req, nil } -// NewGetNetworksRequest generates requests for GetNetworks -func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { +// NewPatchPortalAccountRbacRequest calls the generic PatchPortalAccountRbac builder with application/json body +func NewPatchPortalAccountRbacRequest(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithBody generates requests for PatchPortalAccountRbac with any type of body +func NewPatchPortalAccountRbacRequestWithBody(server string, params *PatchPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3289,7 +3408,7 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/networks") + operationPath := fmt.Sprintf("/portal_account_rbac") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3302,9 +3421,9 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ if params != nil { queryValues := queryURL.Query() - if params.NetworkId != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3318,9 +3437,9 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ } - if params.Select != nil { + if params.PortalAccountId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3334,9 +3453,9 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ } - if params.Order != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3350,9 +3469,9 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ } - if params.Offset != nil { + if params.RoleName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3366,9 +3485,9 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ } - if params.Limit != nil { + if params.UserJoinedAccount != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3385,44 +3504,24 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } + req.Header.Add("Content-Type", contentType) - req.Header.Set("Range-Unit", headerParam1) - } + if params != nil { if params.Prefer != nil { - var headerParam2 string + var headerParam0 string - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam2) + req.Header.Set("Prefer", headerParam0) } } @@ -3430,41 +3529,41 @@ func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Requ return req, nil } -// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body -func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { +// NewPostPortalAccountRbacRequest calls the generic PostPortalAccountRbac builder with application/json body +func NewPostPortalAccountRbacRequest(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) } -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body -func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostPortalAccountRbacRequestWithBody generates requests for PostPortalAccountRbac with any type of body +func NewPostPortalAccountRbacRequestWithBody(server string, params *PostPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3472,7 +3571,7 @@ func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, return nil, err } - operationPath := fmt.Sprintf("/networks") + operationPath := fmt.Sprintf("/portal_account_rbac") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3485,9 +3584,9 @@ func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, if params != nil { queryValues := queryURL.Query() - if params.NetworkId != nil { + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3504,7 +3603,7 @@ func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -3529,41 +3628,8 @@ func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, return req, nil } -// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body -func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body -func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { +// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts +func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3571,7 +3637,7 @@ func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, c return nil, err } - operationPath := fmt.Sprintf("/networks") + operationPath := fmt.Sprintf("/portal_accounts") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3581,12 +3647,124 @@ func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, c return nil, err } - if params != nil { - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } - if params.Select != nil { + if params.PortalAccountUserLimitRps != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3600,59 +3778,41 @@ func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, c } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string + if params.BillingType != nil { - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - req.Header.Set("Prefer", headerParam0) } - } - - return req, nil -} - -// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations -func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.StripeSubscriptionId != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params != nil { - queryValues := queryURL.Query() + } - if params.OrganizationId != nil { + if params.GcpAccountId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3666,9 +3826,9 @@ func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsPar } - if params.OrganizationName != nil { + if params.GcpEntitlementId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3756,8 +3916,8 @@ func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsPar return req, nil } -// NewGetOrganizationsRequest generates requests for GetOrganizations -func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { +// NewGetPortalAccountsRequest generates requests for GetPortalAccounts +func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3765,7 +3925,7 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( return nil, err } - operationPath := fmt.Sprintf("/organizations") + operationPath := fmt.Sprintf("/portal_accounts") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3778,9 +3938,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( if params != nil { queryValues := queryURL.Query() - if params.OrganizationId != nil { + if params.PortalAccountId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3794,9 +3954,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.OrganizationName != nil { + if params.OrganizationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3810,9 +3970,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.DeletedAt != nil { + if params.PortalPlanType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3826,9 +3986,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.CreatedAt != nil { + if params.UserAccountName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3842,9 +4002,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.UpdatedAt != nil { + if params.InternalAccountName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3858,9 +4018,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.Select != nil { + if params.PortalAccountUserLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3874,9 +4034,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.Order != nil { + if params.PortalAccountUserLimitInterval != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3890,9 +4050,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.Offset != nil { + if params.PortalAccountUserLimitRps != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3906,9 +4066,9 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - if params.Limit != nil { + if params.BillingType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3922,112 +4082,89 @@ func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) ( } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string + if params.StripeSubscriptionId != nil { - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - req.Header.Set("Range", headerParam0) } - if params.RangeUnit != nil { - var headerParam1 string + if params.GcpAccountId != nil { - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - req.Header.Set("Range-Unit", headerParam1) } - if params.Prefer != nil { - var headerParam2 string + if params.GcpEntitlementId != nil { - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - req.Header.Set("Prefer", headerParam2) } - } - - return req, nil -} - -// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body -func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} + if params.DeletedAt != nil { -// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body -func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.CreatedAt != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params != nil { - queryValues := queryURL.Query() + } - if params.OrganizationId != nil { + if params.UpdatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4041,9 +4178,9 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati } - if params.OrganizationName != nil { + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4057,9 +4194,9 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati } - if params.DeletedAt != nil { + if params.Order != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4073,9 +4210,9 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati } - if params.CreatedAt != nil { + if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4089,9 +4226,9 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati } - if params.UpdatedAt != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4108,24 +4245,44 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - if params != nil { - if params.Prefer != nil { + if params.Range != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) if err != nil { return nil, err } - req.Header.Set("Prefer", headerParam0) + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) } } @@ -4133,107 +4290,41 @@ func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizati return req, nil } -// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body -func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { +// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body +func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) } -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body -func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts -func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { +// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body +func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4497,11 +4588,13 @@ func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsP queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + if params != nil { if params.Prefer != nil { @@ -4520,8 +4613,41 @@ func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsP return req, nil } -// NewGetPortalAccountsRequest generates requests for GetPortalAccounts -func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { +// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body +func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body +func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4542,9 +4668,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) if params != nil { queryValues := queryURL.Query() - if params.PortalAccountId != nil { + if params.Select != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4558,57 +4684,59 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.OrganizationId != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.PortalPlanType != nil { + if params != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.UserAccountName != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewDeletePortalApplicationRbacRequest generates requests for DeletePortalApplicationRbac +func NewDeletePortalApplicationRbacRequest(server string, params *DeletePortalApplicationRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() - if params.InternalAccountName != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4622,9 +4750,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.PortalAccountUserLimit != nil { + if params.PortalApplicationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4638,9 +4766,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.PortalAccountUserLimitInterval != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4654,9 +4782,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.PortalAccountUserLimitRps != nil { + if params.CreatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4670,9 +4798,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.BillingType != nil { + if params.UpdatedAt != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4686,25 +4814,57 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.StripeSubscriptionId != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.GcpAccountId != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return req, nil +} + +// NewGetPortalApplicationRbacRequest generates requests for GetPortalApplicationRbac +func NewGetPortalApplicationRbacRequest(server string, params *GetPortalApplicationRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4718,9 +4878,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.GcpEntitlementId != nil { + if params.PortalApplicationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4734,9 +4894,9 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) } - if params.DeletedAt != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4894,41 +5054,41 @@ func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) return req, nil } -// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body -func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { +// NewPatchPortalApplicationRbacRequest calls the generic PatchPortalApplicationRbac builder with application/json body +func NewPatchPortalApplicationRbacRequest(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) } -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json body +func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body -func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPatchPortalApplicationRbacRequestWithBody generates requests for PatchPortalApplicationRbac with any type of body +func NewPatchPortalApplicationRbacRequestWithBody(server string, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4936,7 +5096,7 @@ func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAcc return nil, err } - operationPath := fmt.Sprintf("/portal_accounts") + operationPath := fmt.Sprintf("/portal_application_rbac") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4949,169 +5109,9 @@ func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAcc if params != nil { queryValues := queryURL.Query() - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5125,9 +5125,9 @@ func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAcc } - if params.GcpEntitlementId != nil { + if params.PortalApplicationId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5141,9 +5141,9 @@ func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAcc } - if params.DeletedAt != nil { + if params.PortalUserId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5217,41 +5217,41 @@ func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAcc return req, nil } -// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body -func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { +// NewPostPortalApplicationRbacRequest calls the generic PostPortalApplicationRbac builder with application/json body +func NewPostPortalApplicationRbacRequest(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) } -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json body +func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body -func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostPortalApplicationRbacRequestWithBody generates requests for PostPortalApplicationRbac with any type of body +func NewPostPortalApplicationRbacRequestWithBody(server string, params *PostPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5259,7 +5259,7 @@ func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccou return nil, err } - operationPath := fmt.Sprintf("/portal_accounts") + operationPath := fmt.Sprintf("/portal_application_rbac") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6493,11 +6493,274 @@ func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) } - return req, nil + return req, nil +} + +// NewGetPortalPlansRequest generates requests for GetPortalPlans +func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body +func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewGetPortalPlansRequest generates requests for GetPortalPlans -func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { +// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body +func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6614,57 +6877,92 @@ func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*htt } - if params.Select != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.Order != nil { + if params != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.Offset != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body +func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} - if params.Limit != nil { +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body +func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6681,86 +6979,111 @@ func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*htt queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + if params != nil { - if params.Range != nil { + if params.Prefer != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) if err != nil { return nil, err } - req.Header.Set("Range", headerParam0) + req.Header.Set("Prefer", headerParam0) } - if params.RangeUnit != nil { - var headerParam1 string + } - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } + return req, nil +} - req.Header.Set("Range-Unit", headerParam1) - } +// NewGetRpcArmorRequest generates requests for GetRpcArmor +func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { + var err error - if params.Prefer != nil { - var headerParam2 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } + operationPath := fmt.Sprintf("/rpc/armor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - req.Header.Set("Prefer", headerParam2) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } return req, nil } -// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body -func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { +// NewPostRpcArmorRequest calls the generic PostRpcArmor builder with application/json body +func NewPostRpcArmorRequest(server string, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) + return NewPostRpcArmorRequestWithBody(server, params, "application/json", bodyReader) } -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body -func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostRpcArmorRequestWithBody generates requests for PostRpcArmor with any type of body +func NewPostRpcArmorRequestWithBody(server string, params *PostRpcArmorParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6768,7 +7091,7 @@ func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansP return nil, err } - operationPath := fmt.Sprintf("/portal_plans") + operationPath := fmt.Sprintf("/rpc/armor") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6778,109 +7101,129 @@ func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansP return nil, err } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + if params != nil { - queryValues := queryURL.Query() - if params.PortalPlanType != nil { + if params.Prefer != nil { + var headerParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.PortalPlanTypeDescription != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewGetRpcDearmorRequest generates requests for GetRpcDearmor +func NewGetRpcDearmorRequest(server string, params *GetRpcDearmorParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if params.PlanUsageLimit != nil { + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } - if params.PlanUsageLimitInterval != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.PlanRateLimitRps != nil { +// NewPostRpcDearmorRequest calls the generic PostRpcDearmor builder with application/json body +func NewPostRpcDearmorRequest(server string, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/json", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} - } +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} - if params.PlanApplicationLimit != nil { +// NewPostRpcDearmorRequestWithBody generates requests for PostRpcDearmor with any type of body +func NewPostRpcDearmorRequestWithBody(server string, params *PostRpcDearmorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -6905,41 +7248,68 @@ func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansP return req, nil } -// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body -func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { +// NewGetRpcGenRandomUuidRequest generates requests for GetRpcGenRandomUuid +func NewGetRpcGenRandomUuidRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcGenRandomUuidRequest calls the generic PostRpcGenRandomUuid builder with application/json body +func NewPostRpcGenRandomUuidRequest(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/json", bodyReader) } -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body -func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostRpcGenRandomUuidRequestWithBody generates requests for PostRpcGenRandomUuid with any type of body +func NewPostRpcGenRandomUuidRequestWithBody(server string, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6947,7 +7317,7 @@ func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansPar return nil, err } - operationPath := fmt.Sprintf("/portal_plans") + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6957,28 +7327,6 @@ func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansPar return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -7004,8 +7352,8 @@ func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansPar return req, nil } -// NewGetRpcCreatePortalApplicationRequest generates requests for GetRpcCreatePortalApplication -func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreatePortalApplicationParams) (*http.Request, error) { +// NewGetRpcGenSaltRequest generates requests for GetRpcGenSalt +func NewGetRpcGenSaltRequest(server string, params *GetRpcGenSaltParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -7013,7 +7361,7 @@ func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreate return nil, err } - operationPath := fmt.Sprintf("/rpc/create_portal_application") + operationPath := fmt.Sprintf("/rpc/gen_salt") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7026,19 +7374,7 @@ func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreate if params != nil { queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_account_id", runtime.ParamLocationQuery, params.PPortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_user_id", runtime.ParamLocationQuery, params.PPortalUserId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7050,132 +7386,126 @@ func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreate } } - if params.PPortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_name", runtime.ParamLocationQuery, *params.PPortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL.RawQuery = queryValues.Encode() + } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.PEmoji != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_emoji", runtime.ParamLocationQuery, *params.PEmoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewPostRpcGenSaltRequest calls the generic PostRpcGenSalt builder with application/json body +func NewPostRpcGenSaltRequest(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/json", bodyReader) +} - } +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} - if params.PPortalApplicationUserLimit != nil { +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewPostRpcGenSaltRequestWithBody generates requests for PostRpcGenSalt with any type of body +func NewPostRpcGenSaltRequestWithBody(server string, params *PostRpcGenSaltParams, contentType string, body io.Reader) (*http.Request, error) { + var err error - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.PPortalApplicationUserLimitInterval != nil { + operationPath := fmt.Sprintf("/rpc/gen_salt") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) - if params.PPortalApplicationUserLimitRps != nil { + if params != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PPortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Set("Prefer", headerParam0) } - if params.PPortalApplicationDescription != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_portal_application_description", runtime.ParamLocationQuery, *params.PPortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewGetRpcPgpArmorHeadersRequest generates requests for GetRpcPgpArmorHeaders +func NewGetRpcPgpArmorHeadersRequest(server string, params *GetRpcPgpArmorHeadersParams) (*http.Request, error) { + var err error - if params.PFavoriteServiceIds != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_favorite_service_ids", runtime.ParamLocationQuery, *params.PFavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if params.PSecretKeyRequired != nil { + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "p_secret_key_required", runtime.ParamLocationQuery, *params.PSecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } queryURL.RawQuery = queryValues.Encode() @@ -7189,41 +7519,41 @@ func NewGetRpcCreatePortalApplicationRequest(server string, params *GetRpcCreate return req, nil } -// NewPostRpcCreatePortalApplicationRequest calls the generic PostRpcCreatePortalApplication builder with application/json body -func NewPostRpcCreatePortalApplicationRequest(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody) (*http.Request, error) { +// NewPostRpcPgpArmorHeadersRequest calls the generic PostRpcPgpArmorHeaders builder with application/json body +func NewPostRpcPgpArmorHeadersRequest(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/json", bodyReader) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/json", bodyReader) } -// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json body -func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcCreatePortalApplication builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcCreatePortalApplicationRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcCreatePortalApplicationRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPostRpcCreatePortalApplicationRequestWithBody generates requests for PostRpcCreatePortalApplication with any type of body -func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostRpcPgpArmorHeadersRequestWithBody generates requests for PostRpcPgpArmorHeaders with any type of body +func NewPostRpcPgpArmorHeadersRequestWithBody(server string, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -7231,7 +7561,7 @@ func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *Pos return nil, err } - operationPath := fmt.Sprintf("/rpc/create_portal_application") + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7266,8 +7596,8 @@ func NewPostRpcCreatePortalApplicationRequestWithBody(server string, params *Pos return req, nil } -// NewGetRpcMeRequest generates requests for GetRpcMe -func NewGetRpcMeRequest(server string) (*http.Request, error) { +// NewGetRpcPgpKeyIdRequest generates requests for GetRpcPgpKeyId +func NewGetRpcPgpKeyIdRequest(server string, params *GetRpcPgpKeyIdParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -7275,7 +7605,7 @@ func NewGetRpcMeRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/rpc/me") + operationPath := fmt.Sprintf("/rpc/pgp_key_id") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7285,6 +7615,24 @@ func NewGetRpcMeRequest(server string) (*http.Request, error) { return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -7293,41 +7641,41 @@ func NewGetRpcMeRequest(server string) (*http.Request, error) { return req, nil } -// NewPostRpcMeRequest calls the generic PostRpcMe builder with application/json body -func NewPostRpcMeRequest(server string, params *PostRpcMeParams, body PostRpcMeJSONRequestBody) (*http.Request, error) { +// NewPostRpcPgpKeyIdRequest calls the generic PostRpcPgpKeyId builder with application/json body +func NewPostRpcPgpKeyIdRequest(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/json", bodyReader) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/json", bodyReader) } -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -// NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcMe builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcMeRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostRpcMeRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -// NewPostRpcMeRequestWithBody generates requests for PostRpcMe with any type of body -func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostRpcPgpKeyIdRequestWithBody generates requests for PostRpcPgpKeyId with any type of body +func NewPostRpcPgpKeyIdRequestWithBody(server string, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -7335,7 +7683,7 @@ func NewPostRpcMeRequestWithBody(server string, params *PostRpcMeParams, content return nil, err } - operationPath := fmt.Sprintf("/rpc/me") + operationPath := fmt.Sprintf("/rpc/pgp_key_id") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8792,6 +9140,54 @@ func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*htt } + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAt != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { @@ -9080,6 +9476,54 @@ func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Requ } + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAt != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { @@ -9487,6 +9931,54 @@ func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, } + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAt != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { @@ -9692,69 +10184,21 @@ func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithRes } // WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetWithResponse request - GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) - - // DeleteApplicationsWithResponse request - DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) - - // GetApplicationsWithResponse request - GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) - - // PatchApplicationsWithBodyWithResponse request with any body - PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) - - // PostApplicationsWithBodyWithResponse request with any body - PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) - - // DeleteGatewaysWithResponse request - DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) - - // GetGatewaysWithResponse request - GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) - - // PatchGatewaysWithBodyWithResponse request with any body - PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) - - // PostGatewaysWithBodyWithResponse request with any body - PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) - - PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} - PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) // DeleteNetworksWithResponse request DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) @@ -9804,6 +10248,30 @@ type ClientWithResponsesInterface interface { PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + // DeletePortalAccountRbacWithResponse request + DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) + + // GetPortalAccountRbacWithResponse request + GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) + + // PatchPortalAccountRbacWithBodyWithResponse request with any body + PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + // PostPortalAccountRbacWithBodyWithResponse request with any body + PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + // DeletePortalAccountsWithResponse request DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) @@ -9828,6 +10296,30 @@ type ClientWithResponsesInterface interface { PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + // DeletePortalApplicationRbacWithResponse request + DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) + + // GetPortalApplicationRbacWithResponse request + GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) + + // PatchPortalApplicationRbacWithBodyWithResponse request with any body + PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + // PostPortalApplicationRbacWithBodyWithResponse request with any body + PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + // DeletePortalApplicationsWithResponse request DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) @@ -9876,29 +10368,77 @@ type ClientWithResponsesInterface interface { PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - // GetRpcCreatePortalApplicationWithResponse request - GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) + // GetRpcArmorWithResponse request + GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) + + // PostRpcArmorWithBodyWithResponse request with any body + PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + // GetRpcDearmorWithResponse request + GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) + + // PostRpcDearmorWithBodyWithResponse request with any body + PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + // GetRpcGenRandomUuidWithResponse request + GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) + + // PostRpcGenRandomUuidWithBodyWithResponse request with any body + PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - // PostRpcCreatePortalApplicationWithBodyWithResponse request with any body - PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + // GetRpcGenSaltWithResponse request + GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) - PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + // PostRpcGenSaltWithBodyWithResponse request with any body + PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - // GetRpcMeWithResponse request - GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - // PostRpcMeWithBodyWithResponse request with any body - PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + // GetRpcPgpArmorHeadersWithResponse request + GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) - PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + // PostRpcPgpArmorHeadersWithBodyWithResponse request with any body + PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + // GetRpcPgpKeyIdWithResponse request + GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) + + // PostRpcPgpKeyIdWithBodyWithResponse request with any body + PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) // DeleteServiceEndpointsWithResponse request DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) @@ -9994,13 +10534,13 @@ func (r GetResponse) StatusCode() int { return 0 } -type DeleteApplicationsResponse struct { +type DeleteNetworksResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeleteApplicationsResponse) Status() string { +func (r DeleteNetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10008,23 +10548,23 @@ func (r DeleteApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteApplicationsResponse) StatusCode() int { +func (r DeleteNetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApplicationsResponse struct { +type GetNetworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]Applications - ApplicationvndPgrstObjectJSON200 *[]Applications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Applications + JSON200 *[]Networks + ApplicationvndPgrstObjectJSON200 *[]Networks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks } // Status returns HTTPResponse.Status -func (r GetApplicationsResponse) Status() string { +func (r GetNetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10032,20 +10572,20 @@ func (r GetApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApplicationsResponse) StatusCode() int { +func (r GetNetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchApplicationsResponse struct { +type PatchNetworksResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchApplicationsResponse) Status() string { +func (r PatchNetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10053,20 +10593,20 @@ func (r PatchApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchApplicationsResponse) StatusCode() int { +func (r PatchNetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApplicationsResponse struct { +type PostNetworksResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostApplicationsResponse) Status() string { +func (r PostNetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10074,20 +10614,20 @@ func (r PostApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApplicationsResponse) StatusCode() int { +func (r PostNetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteGatewaysResponse struct { +type DeleteOrganizationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeleteGatewaysResponse) Status() string { +func (r DeleteOrganizationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10095,23 +10635,23 @@ func (r DeleteGatewaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteGatewaysResponse) StatusCode() int { +func (r DeleteOrganizationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetGatewaysResponse struct { +type GetOrganizationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]Gateways - ApplicationvndPgrstObjectJSON200 *[]Gateways - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Gateways + JSON200 *[]Organizations + ApplicationvndPgrstObjectJSON200 *[]Organizations + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations } // Status returns HTTPResponse.Status -func (r GetGatewaysResponse) Status() string { +func (r GetOrganizationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10119,20 +10659,20 @@ func (r GetGatewaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetGatewaysResponse) StatusCode() int { +func (r GetOrganizationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchGatewaysResponse struct { +type PatchOrganizationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchGatewaysResponse) Status() string { +func (r PatchOrganizationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10140,20 +10680,20 @@ func (r PatchGatewaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchGatewaysResponse) StatusCode() int { +func (r PatchOrganizationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostGatewaysResponse struct { +type PostOrganizationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostGatewaysResponse) Status() string { +func (r PostOrganizationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10161,20 +10701,20 @@ func (r PostGatewaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostGatewaysResponse) StatusCode() int { +func (r PostOrganizationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteNetworksResponse struct { +type DeletePortalAccountRbacResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeleteNetworksResponse) Status() string { +func (r DeletePortalAccountRbacResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10182,23 +10722,23 @@ func (r DeleteNetworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteNetworksResponse) StatusCode() int { +func (r DeletePortalAccountRbacResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetNetworksResponse struct { +type GetPortalAccountRbacResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]Networks - ApplicationvndPgrstObjectJSON200 *[]Networks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks + JSON200 *[]PortalAccountRbac + ApplicationvndPgrstObjectJSON200 *[]PortalAccountRbac + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccountRbac } // Status returns HTTPResponse.Status -func (r GetNetworksResponse) Status() string { +func (r GetPortalAccountRbacResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10206,20 +10746,20 @@ func (r GetNetworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetNetworksResponse) StatusCode() int { +func (r GetPortalAccountRbacResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchNetworksResponse struct { +type PatchPortalAccountRbacResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchNetworksResponse) Status() string { +func (r PatchPortalAccountRbacResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10227,20 +10767,194 @@ func (r PatchNetworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchNetworksResponse) StatusCode() int { +func (r PatchPortalAccountRbacResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostNetworksResponse struct { +type PostPortalAccountRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts +} + +// Status returns HTTPResponse.Status +func (r GetPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalApplicationRbac + ApplicationvndPgrstObjectJSON200 *[]PortalApplicationRbac + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplicationRbac +} + +// Status returns HTTPResponse.Status +func (r GetPortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalApplicationRbacResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostNetworksResponse) Status() string { +func (r PostPortalApplicationRbacResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10248,20 +10962,20 @@ func (r PostNetworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostNetworksResponse) StatusCode() int { +func (r PostPortalApplicationRbacResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteOrganizationsResponse struct { +type DeletePortalApplicationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeleteOrganizationsResponse) Status() string { +func (r DeletePortalApplicationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10269,23 +10983,23 @@ func (r DeleteOrganizationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteOrganizationsResponse) StatusCode() int { +func (r DeletePortalApplicationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetOrganizationsResponse struct { +type GetPortalApplicationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]Organizations - ApplicationvndPgrstObjectJSON200 *[]Organizations - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations + JSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications } // Status returns HTTPResponse.Status -func (r GetOrganizationsResponse) Status() string { +func (r GetPortalApplicationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10293,20 +11007,20 @@ func (r GetOrganizationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationsResponse) StatusCode() int { +func (r GetPortalApplicationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchOrganizationsResponse struct { +type PatchPortalApplicationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchOrganizationsResponse) Status() string { +func (r PatchPortalApplicationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10314,20 +11028,20 @@ func (r PatchOrganizationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchOrganizationsResponse) StatusCode() int { +func (r PatchPortalApplicationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostOrganizationsResponse struct { +type PostPortalApplicationsResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostOrganizationsResponse) Status() string { +func (r PostPortalApplicationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10335,20 +11049,20 @@ func (r PostOrganizationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationsResponse) StatusCode() int { +func (r PostPortalApplicationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeletePortalAccountsResponse struct { +type DeletePortalPlansResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeletePortalAccountsResponse) Status() string { +func (r DeletePortalPlansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10356,23 +11070,23 @@ func (r DeletePortalAccountsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalAccountsResponse) StatusCode() int { +func (r DeletePortalPlansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetPortalAccountsResponse struct { +type GetPortalPlansResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts + JSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans } // Status returns HTTPResponse.Status -func (r GetPortalAccountsResponse) Status() string { +func (r GetPortalPlansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10380,20 +11094,20 @@ func (r GetPortalAccountsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetPortalAccountsResponse) StatusCode() int { +func (r GetPortalPlansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchPortalAccountsResponse struct { +type PatchPortalPlansResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchPortalAccountsResponse) Status() string { +func (r PatchPortalPlansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10401,20 +11115,20 @@ func (r PatchPortalAccountsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalAccountsResponse) StatusCode() int { +func (r PatchPortalPlansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostPortalAccountsResponse struct { +type PostPortalPlansResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostPortalAccountsResponse) Status() string { +func (r PostPortalPlansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10422,20 +11136,20 @@ func (r PostPortalAccountsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostPortalAccountsResponse) StatusCode() int { +func (r PostPortalPlansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeletePortalApplicationsResponse struct { +type GetRpcArmorResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeletePortalApplicationsResponse) Status() string { +func (r GetRpcArmorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10443,23 +11157,20 @@ func (r DeletePortalApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalApplicationsResponse) StatusCode() int { +func (r GetRpcArmorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications +type PostRpcArmorResponse struct { + Body []byte + HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r GetPortalApplicationsResponse) Status() string { +func (r PostRpcArmorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10467,20 +11178,20 @@ func (r GetPortalApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetPortalApplicationsResponse) StatusCode() int { +func (r PostRpcArmorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchPortalApplicationsResponse struct { +type GetRpcDearmorResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchPortalApplicationsResponse) Status() string { +func (r GetRpcDearmorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10488,20 +11199,20 @@ func (r PatchPortalApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalApplicationsResponse) StatusCode() int { +func (r GetRpcDearmorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostPortalApplicationsResponse struct { +type PostRpcDearmorResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostPortalApplicationsResponse) Status() string { +func (r PostRpcDearmorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10509,20 +11220,20 @@ func (r PostPortalApplicationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostPortalApplicationsResponse) StatusCode() int { +func (r PostRpcDearmorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeletePortalPlansResponse struct { +type GetRpcGenRandomUuidResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r DeletePortalPlansResponse) Status() string { +func (r GetRpcGenRandomUuidResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10530,23 +11241,20 @@ func (r DeletePortalPlansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalPlansResponse) StatusCode() int { +func (r GetRpcGenRandomUuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans +type PostRpcGenRandomUuidResponse struct { + Body []byte + HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r GetPortalPlansResponse) Status() string { +func (r PostRpcGenRandomUuidResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10554,20 +11262,20 @@ func (r GetPortalPlansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetPortalPlansResponse) StatusCode() int { +func (r PostRpcGenRandomUuidResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PatchPortalPlansResponse struct { +type GetRpcGenSaltResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PatchPortalPlansResponse) Status() string { +func (r GetRpcGenSaltResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10575,20 +11283,20 @@ func (r PatchPortalPlansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalPlansResponse) StatusCode() int { +func (r GetRpcGenSaltResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostPortalPlansResponse struct { +type PostRpcGenSaltResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostPortalPlansResponse) Status() string { +func (r PostRpcGenSaltResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10596,20 +11304,20 @@ func (r PostPortalPlansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostPortalPlansResponse) StatusCode() int { +func (r PostRpcGenSaltResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetRpcCreatePortalApplicationResponse struct { +type GetRpcPgpArmorHeadersResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r GetRpcCreatePortalApplicationResponse) Status() string { +func (r GetRpcPgpArmorHeadersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10617,20 +11325,20 @@ func (r GetRpcCreatePortalApplicationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetRpcCreatePortalApplicationResponse) StatusCode() int { +func (r GetRpcPgpArmorHeadersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostRpcCreatePortalApplicationResponse struct { +type PostRpcPgpArmorHeadersResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostRpcCreatePortalApplicationResponse) Status() string { +func (r PostRpcPgpArmorHeadersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10638,20 +11346,20 @@ func (r PostRpcCreatePortalApplicationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostRpcCreatePortalApplicationResponse) StatusCode() int { +func (r PostRpcPgpArmorHeadersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetRpcMeResponse struct { +type GetRpcPgpKeyIdResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r GetRpcMeResponse) Status() string { +func (r GetRpcPgpKeyIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10659,20 +11367,20 @@ func (r GetRpcMeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetRpcMeResponse) StatusCode() int { +func (r GetRpcPgpKeyIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostRpcMeResponse struct { +type PostRpcPgpKeyIdResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r PostRpcMeResponse) Status() string { +func (r PostRpcPgpKeyIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10680,7 +11388,7 @@ func (r PostRpcMeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostRpcMeResponse) StatusCode() int { +func (r PostRpcPgpKeyIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10927,706 +11635,874 @@ func (r PatchServicesResponse) StatusCode() int { return 0 } -type PostServicesResponse struct { - Body []byte - HTTPResponse *http.Response +type PostServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetResponse(rsp) +} + +// DeleteNetworksWithResponse request returning *DeleteNetworksResponse +func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { + rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteNetworksResponse(rsp) +} + +// GetNetworksWithResponse request returning *GetNetworksResponse +func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { + rsp, err := c.GetNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworksResponse(rsp) +} + +// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse +func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse +func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse +func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { + rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrganizationsResponse(rsp) +} + +// GetOrganizationsWithResponse request returning *GetOrganizationsResponse +func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { + rsp, err := c.GetOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationsResponse(rsp) +} + +// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse +func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r PostServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse +func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParsePostOrganizationsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r PostServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParsePostOrganizationsResponse(rsp) } -// GetWithResponse request returning *GetResponse -func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { - rsp, err := c.Get(ctx, reqEditors...) +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseGetResponse(rsp) + return ParsePostOrganizationsResponse(rsp) } -// DeleteApplicationsWithResponse request returning *DeleteApplicationsResponse -func (c *ClientWithResponses) DeleteApplicationsWithResponse(ctx context.Context, params *DeleteApplicationsParams, reqEditors ...RequestEditorFn) (*DeleteApplicationsResponse, error) { - rsp, err := c.DeleteApplications(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteApplicationsResponse(rsp) + return ParsePostOrganizationsResponse(rsp) } -// GetApplicationsWithResponse request returning *GetApplicationsResponse -func (c *ClientWithResponses) GetApplicationsWithResponse(ctx context.Context, params *GetApplicationsParams, reqEditors ...RequestEditorFn) (*GetApplicationsResponse, error) { - rsp, err := c.GetApplications(ctx, params, reqEditors...) +// DeletePortalAccountRbacWithResponse request returning *DeletePortalAccountRbacResponse +func (c *ClientWithResponses) DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) { + rsp, err := c.DeletePortalAccountRbac(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetApplicationsResponse(rsp) + return ParseDeletePortalAccountRbacResponse(rsp) } -// PatchApplicationsWithBodyWithResponse request with arbitrary body returning *PatchApplicationsResponse -func (c *ClientWithResponses) PatchApplicationsWithBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithBody(ctx, params, contentType, body, reqEditors...) +// GetPortalAccountRbacWithResponse request returning *GetPortalAccountRbacResponse +func (c *ClientWithResponses) GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) { + rsp, err := c.GetPortalAccountRbac(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchApplicationsResponse(rsp) + return ParseGetPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PatchApplicationsWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplications(ctx, params, body, reqEditors...) +// PatchPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountRbacResponse +func (c *ClientWithResponses) PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchApplicationsResponse(rsp) + return ParsePatchPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbac(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchApplicationsResponse(rsp) + return ParsePatchPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchApplicationsParams, body PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchApplicationsResponse, error) { - rsp, err := c.PatchApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchApplicationsResponse(rsp) + return ParsePatchPortalAccountRbacResponse(rsp) } -// PostApplicationsWithBodyWithResponse request with arbitrary body returning *PostApplicationsResponse -func (c *ClientWithResponses) PostApplicationsWithBodyWithResponse(ctx context.Context, params *PostApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApplicationsResponse(rsp) + return ParsePatchPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PostApplicationsWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplications(ctx, params, body, reqEditors...) +// PostPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PostPortalAccountRbacResponse +func (c *ClientWithResponses) PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApplicationsResponse(rsp) + return ParsePostPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbac(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApplicationsResponse(rsp) + return ParsePostPortalAccountRbacResponse(rsp) } -func (c *ClientWithResponses) PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostApplicationsParams, body PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsResponse, error) { - rsp, err := c.PostApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApplicationsResponse(rsp) + return ParsePostPortalAccountRbacResponse(rsp) } -// DeleteGatewaysWithResponse request returning *DeleteGatewaysResponse -func (c *ClientWithResponses) DeleteGatewaysWithResponse(ctx context.Context, params *DeleteGatewaysParams, reqEditors ...RequestEditorFn) (*DeleteGatewaysResponse, error) { - rsp, err := c.DeleteGateways(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteGatewaysResponse(rsp) + return ParsePostPortalAccountRbacResponse(rsp) } -// GetGatewaysWithResponse request returning *GetGatewaysResponse -func (c *ClientWithResponses) GetGatewaysWithResponse(ctx context.Context, params *GetGatewaysParams, reqEditors ...RequestEditorFn) (*GetGatewaysResponse, error) { - rsp, err := c.GetGateways(ctx, params, reqEditors...) +// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse +func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { + rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetGatewaysResponse(rsp) + return ParseDeletePortalAccountsResponse(rsp) } -// PatchGatewaysWithBodyWithResponse request with arbitrary body returning *PatchGatewaysResponse -func (c *ClientWithResponses) PatchGatewaysWithBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithBody(ctx, params, contentType, body, reqEditors...) +// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse +func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { + rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchGatewaysResponse(rsp) + return ParseGetPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PatchGatewaysWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGateways(ctx, params, body, reqEditors...) +// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse +func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchGatewaysResponse(rsp) + return ParsePatchPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchGatewaysResponse(rsp) + return ParsePatchPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchGatewaysParams, body PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchGatewaysResponse, error) { - rsp, err := c.PatchGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchGatewaysResponse(rsp) + return ParsePatchPortalAccountsResponse(rsp) } -// PostGatewaysWithBodyWithResponse request with arbitrary body returning *PostGatewaysResponse -func (c *ClientWithResponses) PostGatewaysWithBodyWithResponse(ctx context.Context, params *PostGatewaysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostGatewaysResponse(rsp) + return ParsePatchPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PostGatewaysWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGateways(ctx, params, body, reqEditors...) +// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse +func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostGatewaysResponse(rsp) + return ParsePostPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostGatewaysResponse(rsp) + return ParsePostPortalAccountsResponse(rsp) } -func (c *ClientWithResponses) PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostGatewaysParams, body PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostGatewaysResponse, error) { - rsp, err := c.PostGatewaysWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostGatewaysResponse(rsp) + return ParsePostPortalAccountsResponse(rsp) } -// DeleteNetworksWithResponse request returning *DeleteNetworksResponse -func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { - rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteNetworksResponse(rsp) + return ParsePostPortalAccountsResponse(rsp) } -// GetNetworksWithResponse request returning *GetNetworksResponse -func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { - rsp, err := c.GetNetworks(ctx, params, reqEditors...) +// DeletePortalApplicationRbacWithResponse request returning *DeletePortalApplicationRbacResponse +func (c *ClientWithResponses) DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) { + rsp, err := c.DeletePortalApplicationRbac(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetNetworksResponse(rsp) + return ParseDeletePortalApplicationRbacResponse(rsp) } -// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse -func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) +// GetPortalApplicationRbacWithResponse request returning *GetPortalApplicationRbacResponse +func (c *ClientWithResponses) GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) { + rsp, err := c.GetPortalApplicationRbac(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchNetworksResponse(rsp) + return ParseGetPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) +// PatchPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationRbacResponse +func (c *ClientWithResponses) PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchNetworksResponse(rsp) + return ParsePatchPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbac(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchNetworksResponse(rsp) + return ParsePatchPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchNetworksResponse(rsp) + return ParsePatchPortalApplicationRbacResponse(rsp) } -// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse -func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostNetworksResponse(rsp) + return ParsePatchPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) +// PostPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationRbacResponse +func (c *ClientWithResponses) PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostNetworksResponse(rsp) + return ParsePostPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbac(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostNetworksResponse(rsp) + return ParsePostPortalApplicationRbacResponse(rsp) } -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostNetworksResponse(rsp) + return ParsePostPortalApplicationRbacResponse(rsp) } -// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse -func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { - rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteOrganizationsResponse(rsp) + return ParsePostPortalApplicationRbacResponse(rsp) } -// GetOrganizationsWithResponse request returning *GetOrganizationsResponse -func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { - rsp, err := c.GetOrganizations(ctx, params, reqEditors...) +// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse +func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { + rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetOrganizationsResponse(rsp) + return ParseDeletePortalApplicationsResponse(rsp) } -// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse -func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) +// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse +func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { + rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchOrganizationsResponse(rsp) + return ParseGetPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) +// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse +func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchOrganizationsResponse(rsp) + return ParsePatchPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchOrganizationsResponse(rsp) + return ParsePatchPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchOrganizationsResponse(rsp) + return ParsePatchPortalApplicationsResponse(rsp) } -// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse -func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostOrganizationsResponse(rsp) + return ParsePatchPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) +// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse +func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostOrganizationsResponse(rsp) + return ParsePostPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostOrganizationsResponse(rsp) + return ParsePostPortalApplicationsResponse(rsp) } -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostOrganizationsResponse(rsp) + return ParsePostPortalApplicationsResponse(rsp) } -// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse -func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { - rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeletePortalAccountsResponse(rsp) + return ParsePostPortalApplicationsResponse(rsp) } -// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse -func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { - rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) +// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse +func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { + rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetPortalAccountsResponse(rsp) + return ParseDeletePortalPlansResponse(rsp) } -// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse -func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) +// GetPortalPlansWithResponse request returning *GetPortalPlansResponse +func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { + rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalAccountsResponse(rsp) + return ParseGetPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) +// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse +func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalAccountsResponse(rsp) + return ParsePatchPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalAccountsResponse(rsp) + return ParsePatchPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalAccountsResponse(rsp) + return ParsePatchPortalPlansResponse(rsp) } -// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse -func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalAccountsResponse(rsp) + return ParsePatchPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) +// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse +func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalAccountsResponse(rsp) + return ParsePostPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalAccountsResponse(rsp) + return ParsePostPortalPlansResponse(rsp) } -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalAccountsResponse(rsp) + return ParsePostPortalPlansResponse(rsp) } -// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse -func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { - rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParseDeletePortalApplicationsResponse(rsp) + return ParsePostPortalPlansResponse(rsp) } -// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse -func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { - rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) +// GetRpcArmorWithResponse request returning *GetRpcArmorResponse +func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { + rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcArmorResponse(rsp) +} + +// PostRpcArmorWithBodyWithResponse request with arbitrary body returning *PostRpcArmorResponse +func (c *ClientWithResponses) PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetPortalApplicationsResponse(rsp) + return ParsePostRpcArmorResponse(rsp) } -// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse -func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmor(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalApplicationsResponse(rsp) + return ParsePostRpcArmorResponse(rsp) } -func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalApplicationsResponse(rsp) + return ParsePostRpcArmorResponse(rsp) } -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalApplicationsResponse(rsp) + return ParsePostRpcArmorResponse(rsp) } -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// GetRpcDearmorWithResponse request returning *GetRpcDearmorResponse +func (c *ClientWithResponses) GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) { + rsp, err := c.GetRpcDearmor(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalApplicationsResponse(rsp) + return ParseGetRpcDearmorResponse(rsp) } -// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse -func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) +// PostRpcDearmorWithBodyWithResponse request with arbitrary body returning *PostRpcDearmorResponse +func (c *ClientWithResponses) PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalApplicationsResponse(rsp) + return ParsePostRpcDearmorResponse(rsp) } -func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmor(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalApplicationsResponse(rsp) + return ParsePostRpcDearmorResponse(rsp) } -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalApplicationsResponse(rsp) + return ParsePostRpcDearmorResponse(rsp) } -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalApplicationsResponse(rsp) + return ParsePostRpcDearmorResponse(rsp) } -// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse -func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { - rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) +// GetRpcGenRandomUuidWithResponse request returning *GetRpcGenRandomUuidResponse +func (c *ClientWithResponses) GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) { + rsp, err := c.GetRpcGenRandomUuid(ctx, reqEditors...) if err != nil { return nil, err } - return ParseDeletePortalPlansResponse(rsp) + return ParseGetRpcGenRandomUuidResponse(rsp) } -// GetPortalPlansWithResponse request returning *GetPortalPlansResponse -func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { - rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) +// PostRpcGenRandomUuidWithBodyWithResponse request with arbitrary body returning *PostRpcGenRandomUuidResponse +func (c *ClientWithResponses) PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetPortalPlansResponse(rsp) + return ParsePostRpcGenRandomUuidResponse(rsp) } -// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse -func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuid(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalPlansResponse(rsp) + return ParsePostRpcGenRandomUuidResponse(rsp) } -func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalPlansResponse(rsp) + return ParsePostRpcGenRandomUuidResponse(rsp) } -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalPlansResponse(rsp) + return ParsePostRpcGenRandomUuidResponse(rsp) } -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// GetRpcGenSaltWithResponse request returning *GetRpcGenSaltResponse +func (c *ClientWithResponses) GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) { + rsp, err := c.GetRpcGenSalt(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParsePatchPortalPlansResponse(rsp) + return ParseGetRpcGenSaltResponse(rsp) } -// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse -func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) +// PostRpcGenSaltWithBodyWithResponse request with arbitrary body returning *PostRpcGenSaltResponse +func (c *ClientWithResponses) PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalPlansResponse(rsp) + return ParsePostRpcGenSaltResponse(rsp) } -func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSalt(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalPlansResponse(rsp) + return ParsePostRpcGenSaltResponse(rsp) } -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalPlansResponse(rsp) + return ParsePostRpcGenSaltResponse(rsp) } -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostPortalPlansResponse(rsp) + return ParsePostRpcGenSaltResponse(rsp) } -// GetRpcCreatePortalApplicationWithResponse request returning *GetRpcCreatePortalApplicationResponse -func (c *ClientWithResponses) GetRpcCreatePortalApplicationWithResponse(ctx context.Context, params *GetRpcCreatePortalApplicationParams, reqEditors ...RequestEditorFn) (*GetRpcCreatePortalApplicationResponse, error) { - rsp, err := c.GetRpcCreatePortalApplication(ctx, params, reqEditors...) +// GetRpcPgpArmorHeadersWithResponse request returning *GetRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) { + rsp, err := c.GetRpcPgpArmorHeaders(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetRpcCreatePortalApplicationResponse(rsp) + return ParseGetRpcPgpArmorHeadersResponse(rsp) } -// PostRpcCreatePortalApplicationWithBodyWithResponse request with arbitrary body returning *PostRpcCreatePortalApplicationResponse -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithBody(ctx, params, contentType, body, reqEditors...) +// PostRpcPgpArmorHeadersWithBodyWithResponse request with arbitrary body returning *PostRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcCreatePortalApplicationResponse(rsp) + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplication(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeaders(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcCreatePortalApplicationResponse(rsp) + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcCreatePortalApplicationResponse(rsp) + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -func (c *ClientWithResponses) PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcCreatePortalApplicationParams, body PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcCreatePortalApplicationResponse, error) { - rsp, err := c.PostRpcCreatePortalApplicationWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcCreatePortalApplicationResponse(rsp) + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -// GetRpcMeWithResponse request returning *GetRpcMeResponse -func (c *ClientWithResponses) GetRpcMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcMeResponse, error) { - rsp, err := c.GetRpcMe(ctx, reqEditors...) +// GetRpcPgpKeyIdWithResponse request returning *GetRpcPgpKeyIdResponse +func (c *ClientWithResponses) GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) { + rsp, err := c.GetRpcPgpKeyId(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetRpcMeResponse(rsp) + return ParseGetRpcPgpKeyIdResponse(rsp) } -// PostRpcMeWithBodyWithResponse request with arbitrary body returning *PostRpcMeResponse -func (c *ClientWithResponses) PostRpcMeWithBodyWithResponse(ctx context.Context, params *PostRpcMeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithBody(ctx, params, contentType, body, reqEditors...) +// PostRpcPgpKeyIdWithBodyWithResponse request with arbitrary body returning *PostRpcPgpKeyIdResponse +func (c *ClientWithResponses) PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcMeResponse(rsp) + return ParsePostRpcPgpKeyIdResponse(rsp) } -func (c *ClientWithResponses) PostRpcMeWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMe(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyId(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcMeResponse(rsp) + return ParsePostRpcPgpKeyIdResponse(rsp) } -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcMeResponse(rsp) + return ParsePostRpcPgpKeyIdResponse(rsp) } -func (c *ClientWithResponses) PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcMeParams, body PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcMeResponse, error) { - rsp, err := c.PostRpcMeWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - return ParsePostRpcMeResponse(rsp) + return ParsePostRpcPgpKeyIdResponse(rsp) } // DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse @@ -11897,15 +12773,15 @@ func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { return response, nil } -// ParseDeleteApplicationsResponse parses an HTTP response from a DeleteApplicationsWithResponse call -func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsResponse, error) { +// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call +func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteApplicationsResponse{ + response := &DeleteNetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11913,36 +12789,36 @@ func ParseDeleteApplicationsResponse(rsp *http.Response) (*DeleteApplicationsRes return response, nil } -// ParseGetApplicationsResponse parses an HTTP response from a GetApplicationsWithResponse call -func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, error) { +// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call +func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApplicationsResponse{ + response := &GetNetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Applications + var dest []Networks if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Applications + var dest []Networks if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.ApplicationvndPgrstObjectJSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Applications + var dest []Networks if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11956,15 +12832,15 @@ func ParseGetApplicationsResponse(rsp *http.Response) (*GetApplicationsResponse, return response, nil } -// ParsePatchApplicationsResponse parses an HTTP response from a PatchApplicationsWithResponse call -func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsResponse, error) { +// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call +func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchApplicationsResponse{ + response := &PatchNetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11972,15 +12848,15 @@ func ParsePatchApplicationsResponse(rsp *http.Response) (*PatchApplicationsRespo return response, nil } -// ParsePostApplicationsResponse parses an HTTP response from a PostApplicationsWithResponse call -func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsResponse, error) { +// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call +func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApplicationsResponse{ + response := &PostNetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11988,15 +12864,15 @@ func ParsePostApplicationsResponse(rsp *http.Response) (*PostApplicationsRespons return response, nil } -// ParseDeleteGatewaysResponse parses an HTTP response from a DeleteGatewaysWithResponse call -func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, error) { +// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call +func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteGatewaysResponse{ + response := &DeleteOrganizationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12004,36 +12880,36 @@ func ParseDeleteGatewaysResponse(rsp *http.Response) (*DeleteGatewaysResponse, e return response, nil } -// ParseGetGatewaysResponse parses an HTTP response from a GetGatewaysWithResponse call -func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) { +// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call +func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetGatewaysResponse{ + response := &GetOrganizationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Gateways + var dest []Organizations if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Gateways + var dest []Organizations if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.ApplicationvndPgrstObjectJSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Gateways + var dest []Organizations if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12047,15 +12923,15 @@ func ParseGetGatewaysResponse(rsp *http.Response) (*GetGatewaysResponse, error) return response, nil } -// ParsePatchGatewaysResponse parses an HTTP response from a PatchGatewaysWithResponse call -func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, error) { +// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call +func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchGatewaysResponse{ + response := &PatchOrganizationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12063,15 +12939,15 @@ func ParsePatchGatewaysResponse(rsp *http.Response) (*PatchGatewaysResponse, err return response, nil } -// ParsePostGatewaysResponse parses an HTTP response from a PostGatewaysWithResponse call -func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error) { +// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call +func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostGatewaysResponse{ + response := &PostOrganizationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12079,15 +12955,15 @@ func ParsePostGatewaysResponse(rsp *http.Response) (*PostGatewaysResponse, error return response, nil } -// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call -func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { +// ParseDeletePortalAccountRbacResponse parses an HTTP response from a DeletePortalAccountRbacWithResponse call +func ParseDeletePortalAccountRbacResponse(rsp *http.Response) (*DeletePortalAccountRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteNetworksResponse{ + response := &DeletePortalAccountRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12095,36 +12971,36 @@ func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, e return response, nil } -// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call -func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { +// ParseGetPortalAccountRbacResponse parses an HTTP response from a GetPortalAccountRbacWithResponse call +func ParseGetPortalAccountRbacResponse(rsp *http.Response) (*GetPortalAccountRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetNetworksResponse{ + response := &GetPortalAccountRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Networks + var dest []PortalAccountRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Networks + var dest []PortalAccountRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.ApplicationvndPgrstObjectJSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Networks + var dest []PortalAccountRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12138,15 +13014,15 @@ func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) return response, nil } -// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call -func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { +// ParsePatchPortalAccountRbacResponse parses an HTTP response from a PatchPortalAccountRbacWithResponse call +func ParsePatchPortalAccountRbacResponse(rsp *http.Response) (*PatchPortalAccountRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchNetworksResponse{ + response := &PatchPortalAccountRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12154,15 +13030,15 @@ func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, err return response, nil } -// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call -func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { +// ParsePostPortalAccountRbacResponse parses an HTTP response from a PostPortalAccountRbacWithResponse call +func ParsePostPortalAccountRbacResponse(rsp *http.Response) (*PostPortalAccountRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostNetworksResponse{ + response := &PostPortalAccountRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12170,15 +13046,15 @@ func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error return response, nil } -// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call -func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { +// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call +func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteOrganizationsResponse{ + response := &DeletePortalAccountsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12186,36 +13062,36 @@ func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsR return response, nil } -// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call -func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { +// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call +func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetOrganizationsResponse{ + response := &GetPortalAccountsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Organizations + var dest []PortalAccounts if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Organizations + var dest []PortalAccounts if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.ApplicationvndPgrstObjectJSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Organizations + var dest []PortalAccounts if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12229,15 +13105,15 @@ func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsRespons return response, nil } -// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call -func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { +// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call +func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchOrganizationsResponse{ + response := &PatchPortalAccountsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12245,15 +13121,15 @@ func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsRes return response, nil } -// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call -func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { +// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call +func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostOrganizationsResponse{ + response := &PostPortalAccountsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12261,15 +13137,15 @@ func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsRespo return response, nil } -// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call -func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { +// ParseDeletePortalApplicationRbacResponse parses an HTTP response from a DeletePortalApplicationRbacWithResponse call +func ParseDeletePortalApplicationRbacResponse(rsp *http.Response) (*DeletePortalApplicationRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePortalAccountsResponse{ + response := &DeletePortalApplicationRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12277,36 +13153,36 @@ func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccount return response, nil } -// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call -func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { +// ParseGetPortalApplicationRbacResponse parses an HTTP response from a GetPortalApplicationRbacWithResponse call +func ParseGetPortalApplicationRbacResponse(rsp *http.Response) (*GetPortalApplicationRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPortalAccountsResponse{ + response := &GetPortalApplicationRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalAccounts + var dest []PortalApplicationRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalAccounts + var dest []PortalApplicationRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.ApplicationvndPgrstObjectJSON200 = &dest case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalAccounts + var dest []PortalApplicationRbac if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12320,15 +13196,15 @@ func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsRespo return response, nil } -// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call -func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { +// ParsePatchPortalApplicationRbacResponse parses an HTTP response from a PatchPortalApplicationRbacWithResponse call +func ParsePatchPortalApplicationRbacResponse(rsp *http.Response) (*PatchPortalApplicationRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchPortalAccountsResponse{ + response := &PatchPortalApplicationRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12336,15 +13212,15 @@ func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsR return response, nil } -// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call -func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { +// ParsePostPortalApplicationRbacResponse parses an HTTP response from a PostPortalApplicationRbacWithResponse call +func ParsePostPortalApplicationRbacResponse(rsp *http.Response) (*PostPortalApplicationRbacResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostPortalAccountsResponse{ + response := &PostPortalApplicationRbacResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12534,15 +13410,143 @@ func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, return response, nil } -// ParseGetRpcCreatePortalApplicationResponse parses an HTTP response from a GetRpcCreatePortalApplicationWithResponse call -func ParseGetRpcCreatePortalApplicationResponse(rsp *http.Response) (*GetRpcCreatePortalApplicationResponse, error) { +// ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call +func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcArmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcArmorResponse parses an HTTP response from a PostRpcArmorWithResponse call +func ParsePostRpcArmorResponse(rsp *http.Response) (*PostRpcArmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcArmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcDearmorResponse parses an HTTP response from a GetRpcDearmorWithResponse call +func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcDearmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcDearmorResponse parses an HTTP response from a PostRpcDearmorWithResponse call +func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcDearmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcGenRandomUuidResponse parses an HTTP response from a GetRpcGenRandomUuidWithResponse call +func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcGenRandomUuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcGenRandomUuidResponse parses an HTTP response from a PostRpcGenRandomUuidWithResponse call +func ParsePostRpcGenRandomUuidResponse(rsp *http.Response) (*PostRpcGenRandomUuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcGenRandomUuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcGenSaltResponse parses an HTTP response from a GetRpcGenSaltWithResponse call +func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRpcGenSaltResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostRpcGenSaltResponse parses an HTTP response from a PostRpcGenSaltWithResponse call +func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostRpcGenSaltResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetRpcPgpArmorHeadersResponse parses an HTTP response from a GetRpcPgpArmorHeadersWithResponse call +func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHeadersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcCreatePortalApplicationResponse{ + response := &GetRpcPgpArmorHeadersResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12550,15 +13554,15 @@ func ParseGetRpcCreatePortalApplicationResponse(rsp *http.Response) (*GetRpcCrea return response, nil } -// ParsePostRpcCreatePortalApplicationResponse parses an HTTP response from a PostRpcCreatePortalApplicationWithResponse call -func ParsePostRpcCreatePortalApplicationResponse(rsp *http.Response) (*PostRpcCreatePortalApplicationResponse, error) { +// ParsePostRpcPgpArmorHeadersResponse parses an HTTP response from a PostRpcPgpArmorHeadersWithResponse call +func ParsePostRpcPgpArmorHeadersResponse(rsp *http.Response) (*PostRpcPgpArmorHeadersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcCreatePortalApplicationResponse{ + response := &PostRpcPgpArmorHeadersResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12566,15 +13570,15 @@ func ParsePostRpcCreatePortalApplicationResponse(rsp *http.Response) (*PostRpcCr return response, nil } -// ParseGetRpcMeResponse parses an HTTP response from a GetRpcMeWithResponse call -func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { +// ParseGetRpcPgpKeyIdResponse parses an HTTP response from a GetRpcPgpKeyIdWithResponse call +func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcMeResponse{ + response := &GetRpcPgpKeyIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12582,15 +13586,15 @@ func ParseGetRpcMeResponse(rsp *http.Response) (*GetRpcMeResponse, error) { return response, nil } -// ParsePostRpcMeResponse parses an HTTP response from a PostRpcMeWithResponse call -func ParsePostRpcMeResponse(rsp *http.Response) (*PostRpcMeResponse, error) { +// ParsePostRpcPgpKeyIdResponse parses an HTTP response from a PostRpcPgpKeyIdWithResponse call +func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcMeResponse{ + response := &PostRpcPgpKeyIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12874,95 +13878,91 @@ func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w9XW/ctpZ/hdAukBQ7sd30A7he5CFN27vd26aGk+w+NMFcWuLMsJYohaTs+Bb+7xfU", - "JyVSEiVSGsfRSxCPDs85Is+3eMi/PD+Okpggwpl3/peXQAojxBHN/gpxhLn4T4CYT3HCcUy8c+9X8TMm", - "ewBJAC7gHhOYPdl4WDz+mCJ65208AiPknRdINh7zDyiCAhu/S8QDxikme+/+fuPFux1D1pQKLAOkaICo", - "Sul38bOA6UCdjerHnFC0Q/RVnBLNm1xkDxHxUUnhgGCOsyCRQzRoIJJG3vkfni9wviAxQd6HTSflC7F2", - "zDHpTCDYC4bJPkTP4qs/kc97mYiZ67eniKeUvKAooYghwksRKH6PMMERDOsfsnkSf7E4TAXsC7wnMUXP", - "gjQJsQ85Ys3HEaL7xtOe97vMaDyEN9QySSHZo9F61Gb1MsPSL+0ZpXdkgn3QUnuWoZJJBmgH05B75x7m", - "KBJLpmEivv0ZhxzRE5jkq4djwuQ/tjAIKGIatfghjP1r/wAxAQUMiHeAHxCQhneYAx0BmfddTCMoWPcP", - "kEKfIwpuIL3L7cuk10govoEcba/R3faAPgkiQ4y1h7hn0KcIchRsIe/iR4LQkuc4QozDKAG3mB+A+BP8", - "K9dfYy72kKNbeCevtI6VNpj76SCI38b0eouDLh4kCPfkGaI32Ec95CWIGchzeI22MCr9n5YBGUbLwhXe", - "4+zZSLoBInHUTzYHcf/iaRIMaIEE4VILCok+oh5WHGh00NTaFkM7LO0sWquwbWhdu8DdMrW8GalIt3W4", - "uYYvs9+zdYuvEWEgAw/A1Z3BQjpS/Rary6p9RfxoKl+s/DGEJKZ7SPC/ju36m2wEKEQ1G01xfRPvOMgB", - "QEWsQzolPPMxK//Vs3BtMC1DmHC0z6LoifRzYu05ew0jVBpmGbwzLW5jnEHUjqZsSUw5DLfQz/JvdnKF", - "wxCT/TYfo2elAeNkMtpcHE3z2ow0dW9BrWozsveT8o8etWpBzbI2ggYiHPMQRWiQmxbkLBwJO0FJ/Uul", - "9zqm9MCz8LW8LWxz0Py74KFpDd8R/DFFAAdipXYYUbCLaWYb88GgGNxhHVUKs0xli0zKEN1WlVsDvqQB", - "801vTWSbSdkNDEezV4/U8pmkVyH2T5IQEhnSDdM0YeP5FYPcT2n2gn0+SIGbRewEUIK2LL2qVEarRG8y", - "OCDDtTWqcJqdmYOW0Cwv9WBijUyKTGy2Cuh0Yh5EuU/HzNGjD5kZFMV/4i4+8oezrcoO3sQUc7Stq3ud", - "pkoLa8bZHx8m8Kb1sUdwlTqepEp5w2D1M9gxakluh2exCbwkb32Wqgt8Sf7MgyP9IAfe3JhD40BpYLTr", - "YMn8BQyCpu6BjqeaIZ8inpdsITuoccr/QHZAAcjhwDW6y0ITCQeAKT+IuKX302CbzmzSLRGi6GOKKer5", - "7qOC6kuwcRwiSCZwc+zASQgyy8VZlql+VddD2wuexAyFHDW1oSl1l5AjkD0HmACxOohxBhJEhSTGJOjK", - "LTXInTKeMrhH244dQL/BTzhKI5ABARiG8S0KsnXDJMuPJZPSyb1MYS7Wh21o5wDHZrPg7yGkcHpWRkRB", - "+jFOWCwDU0SCJMZHrXeqrJT/6wnBZBALoe6h3Sc2TaA+CW5DjmNm+a0GKg9H8zglKzsYhlfQv34AIlqz", - "Uv5vm9KwOwuUYJyuTs1H+xcDUZFBHaiOysvy0lrzcGxpZSfQ5/im03IUTy2iworQFeKw8/OYeOaCiB9H", - "mOy3LO52VjKII5JJytE2JZizbYLolqIQ3qnR0auYZdFcMQBkA7JsAkH/APJRmy6etTTs9eH4VuqINbuK", - "gwOkQW1oEIFXYXfapAd2IUrL796oSH9MYYj5nfEkdMK7mIfSTgZxBDHRpEf/B0McgOJx8fUNM1CM60zB", - "m1gdFTgVrhf3JzXpvjpbA2Ye8vEtQXRow60e2DFDN/st9rt9QPVcb03QJ25KaWEHzlCIfE3mnbOFyR68", - "isM0yqRbP/nZ+L49/OI983rDD3GAUbaOck1H/O3HhKN8L6D06PRPlk95jfw/Kdp5595/nNb9RKf5U3ba", - "QCrIyqhuSHCS7CnjJ3lzyX/Njfu/SRqG7EX2VTHJ7d5EUkJ8Tn12MxnF/aa1us3nm3LDqbulqBA6XoZx", - "eCcvQYPM+OmXhitTXz/blM7X3bRXCB1P+zi8k6e9QWb8tEvDlWmvn20am33czX0Tq+MFmIB88iqotMYv", - "RRuHsh4tgE3ry6y7ZWnjdbwwk9BPXhodtfGLo2JRlkcB2Wi+pLlfpBkd+GQS1otl7871mDoXreXc5Wq8", - "6xXLkc6zVCNw265RTWry4pQoulaleL7xlAqzszVRMTtemIkEJq+Ont74JdLhUdZJA7RRasbuF6vGPNNi", - "jSRgvVhNetMXS8bTuVgSULVYztdorqVZaEUsF6Jv/nPUxQBdXt86/IIUnZkSVFZsS2jsI8Yw2edVawb4", - "gcbp/pB95C9id2/jJTROEOVqEcGy/f49eU9exxydvydvD5gBzAAEFxRHkN6Bf6C7k/fp2dk3fnJ9mv0H", - "eZv+mlIEP/2KyJ4fvPPvzpSyy8Yb6Lg3xf39txrczfJ7fbrBq3eXlz+9frt9+8tvP715+/K3C/klzGtG", - "G2+wB1eZyZ9jivCeiJkEPAb/7Grn/Wcxz7trwOFViF48KSGfAD8rQ1W/lEOeOFqRZqV85PtouiXVVymB", - "6lepoSe8xbfPNW/RrBiPfAtN3Vl9ixKofosa2tlbtLqDOzt3yw9T1ZiqTdeU/tffaeg3S7DONaioh+Yb", - "6f7oOOND048u1/olca3PZylOzWnV8/QmuIAAmORvkHVLED9MA2GEs9nMjlUpCIEAcYhDptjg41ubwY7/", - "pY17T7O/lWF/JCbKTev/47YJGu1vHWvQOHJgwBrIZeZWz1SaiPRUTHCtRSU4eHoR+9eIgwhiQhDfAI4Y", - "z/6DuH/ylWILRgmoGwXUiFhrKgfmRqkFt7dYRAkkGDEQU+CnjMcRomBP4zQRMSrkwIcEXCEAOYf+AQVC", - "2S7yps2XZfFscZs55bSCSYQ03bVull3ZciKptd3xAsYm+G9HtwJqU7L66jqZ1pTSW9uq05DjZxwRSHjZ", - "W8xy7rIyVeb5i2bJbIv1npbT15Tk9kkFppP7/OwYiUtTLaZFI8oRAMav/N13HfjURn47nJ2t+FZ+e7yq", - "t0OQ3kNK1GCkAV5HJK1xT0Yaj45u/FLW9ohsKSRBHG3TFAdPhZOb1qs/Y9T5zfea9entzp8yNR0NYuVZ", - "kkEWhkUx4Qdv490hSIUtGtnAsPEGO+HHsN5odxgpnb09C6p0yuC1cLbHuQuaZ+iBt7MyM7vCjaftTHcX", - "F+o6gRUx6vOuvZXOl3KFs3BsZd9S004UfpcfEKYgviWAVp1auR9miHNM9kcPIyehqBrWjZMvnW3raj0f", - "2GSZn+eq7kirKEBK4V2PV5hiQLrPfek0IuUQxY7UY5849hLdTel2VqGzjXyMiz2G29T0lltZ7MGe8FEu", - "ebhveya33NtvbfQKc/RD28loR0NzJaE7GDJUjSt3mi+e/XUdsqDaqh4vVW36aLmnG4hDYYOaoUKe/Inp", - "HyphdDdAm8m1q5Zlc2rO+ownkVxAV8cEv7MV3zbeULuvOfIzQw3pD9e02226tKEEAgKN1EpV94EsHIK1", - "OoHnL64p7b/13RAR4j/8/NbbeH7MoljYhMuf3oi///fN76+fXV688jbe/7954228vfhDI8oDzcCP5fvl", - "sn6i1Qlez2CfNjT2M7U6P4pH4N3lr7kKlHMGbg+IgKQQskqhwA7icHnVaHcg2wYF2j7i+RVuFfnxIt/R", - "yS1/IG9IR48mmH4Uq3RgR+MoCwmKj2OvuzYnVW3Qw4Fl2ck8DNlqRzYa4LSZ2EimP4fKRGeH7vCcPo4P", - "8X0NusNzYN9R66x4M8qCzhj5tntmzUtef+vBprTAWu1NkftYB9pTj2XUG7a87C1uSZtq0AU29Cn/8PVj", - "7OuuJ4sZ34uIFfwY+2kkXX+VBRDegfOEnZ+eJgKOIsZPYro/ReT05uvnJ2enMMEnBx6F+Re2XZyJJuZh", - "cQEECSANQB7ngmJ/7ca7QZTl1AWOk+fgKfwWnZ3tdl9ln9QSRGCCvXPvm5OzkzPhQiA/ZKyfin/2+VV1", - "wqtkrP4SeOfe37Ob5yhiSUxY7mqen51pNnr9I9+bm0ZC3sUPCSIvL34BEhh4mulkUMzHV2KN4J6J1fiF", - "cBqzBPkZug8C1ala8hZWWGXxx+x3uQSevVp9498f+o3HNcjpiAu37jdTsbV32UzHJMmuBRJ5i48tmnxr", - "0HQsfTuUp2OVPOd0JFJ0MR2JZNsMkDTu5Lv/oOjftzrPA14VPQgtPbTdBF+qaEMdP9xvOu3FqomrJj4W", - "TSzOmzCAzK9SNeEru4XSFDC7P9KEfH5JrAFkXpM2tkL5xa8aI3Q2qu+piq/Nz5Foh97jm6IWItrbMeWG", - "B307lQvcSq+ViOQ23vOz7zUxLaQcw3BxT5NA7h9UX3Mhfl69zeptHnHcVx5kdNel5o2zjhRlf5CBY1Jc", - "pt3S5pjZhY7mvlq603uOWf5aU+7MhWmhKRbZc7Mnqy9z/nsJOd16dl6YOkpz9Pd12qCYYJ5095VOQ9DV", - "mDUN21RzpLvc80gp6PQmwFLOK6Huyz9XeV7leU3kjprIyafOLZLE2RG0T+B66Vskbz143Sduju1zX9a2", - "2ujVRs+Q/sjq8vAClu68Z7I6LJfz9Ezt6HzH6byKZKfZct6X7LwuIacbHt1l9QtH1LaN9OU0VvPWF08f", - "b8rWoG3JoE0+s3aRoM2OoH3Q1kvfImjrwesuaJvFBPSFbA/Kco50XvKKPDSz2x0VTJ7x5aKCnok1jgpm", - "mFURE2iOWukLDH5vgE+X8d5jB8aF0T2oso1qFsikHa0WWKbmB00sxytMOjpupxTApsT1hVSrsH0ewrYG", - "oEsGoMoh/YtEoQ6o2oeiw0xYxKNDyN0FpbMb1L4AdTWqn60HHxl1KgL9kGOA7vjeTmCXC/KHpts40p95", - "rkXUrz2Mri/uz9HLJw9MNBuDB7KM07A2Ois71MFb3cpuhU09OskKnf5AORfvqzmtbB609QEKM+GnCbND", - "3ThK0QpTx2FhVjhb5x5a42qdeWiFb6rjbeOZ6noV7Tta+mxxrmdpwtvmui9pXi31aqlXS71a6i/EUq+1", - "pyVrT5obCBepPjmha19/MmHDogI1jN5dDWqmqKSv8rRGJmtkskYma2Ty5eaQIyuKGn/w8PLQ7sKtpb1f", - "rnI7PM/GtdtZJlmu2I467aVYATe9vxoOTvTH4U5SMh1aS7s0wOl0Zycjzg9Tn4M/W99pjN7Sh5rTmexL", - "B0jImmmNX3uuvTXW9onbLhFWB3ZZI7X1uC46w3W4jle9nefOiLatNz00aDXoq0FfDfpq0L8wg74WeY9R", - "5D3GMVPOaLsr9s546JQZCXdF3+MEMwY14TWgWQOaNaBZA5ovOEOdWLN0d5LZkZzDUPn48zjrzGw5jMvI", - "x1gLqcosXVA2XF6+yICtvbb+jtdJiqlHZW2DC7Tte8vcobLzchLO1iVultjUG+WWrsGNvxivJeq5QA9X", - "1lZZXmV5LT88iPJDrrIL1x0siDorOHTzYF9p6MLtsMTg0FYPFw5We73a6xmzq0pdHkjwMpQsTVOHxbOk", - "rmk1T4+czalIemjin+Y51lbNjKQrnzRXqUGOGEgZoiBC0RWi7IATUNxOXCRo4ArtYoryLA7H5AS8J7lo", - "shxMulO7OMFNOuVNQOwREcvduI77pLg+bZcSPz8YjgH0KYkZCsANhqC+VwsycPH7m7dg4DU3akh8mfj5", - "9CuZuCpiWEzJxxTRO2/j5XeteclWrZLKt4txmqKN5Mh671BTrikboJnV9JYkqNRt3VPKC7mLvIFU2dXS", - "675ociIZ+TJtDb2B+7anEhUeas73k02G+3XT1oHNyGS3ORoT0lVytXT0lxZ25Q0Dd+PlxocBWJW8JFOZ", - "Vb1gGALIWOzjzDxe/vDyFUCEU4yEDQUQMEz2IQKQxxH2AaeQMOjnVljyCU9p4n8Fum2j7Hq/KCcgEIzx", - "Ambhg/iB6QII4zxSFyPMJSfvyaNb5OadyKVfGWmWNl0GaNjumN8iqwshJvA5YJndYDS6YdYMleR9zZzS", - "xty9jvCqGyP/OZrDMjSbMFc6R2Tgf5p32urjUoU9zXW2o2tPq6FaDdVqqFZD9QANVW+9erVbq91a7dZq", - "t5a3W/pvXKs9Wu3Rao9We7S0Pbpvfz64/9wrmeUHr1x0u3ZDXSb+b8gb8a5NBiI08LmyxH+k+qF1Xu86", - "3jb1g07lU7NmQjpK045IkMTY6HTYN/mQn6oR03dkKNRPyv+NbrJQUU29GbyHqfEbRVRkU/ehq5iO2Cdd", - "fZIvuQFiavLP8Qj6B1BwK1krVdL6dmiuQvZZCtm6eXLJzZOqSi21g9IRZfttlGaMWOylNCEwx4ZKW8Pa", - "t51yNa6PxYOP3JKnFeYHEQd0Zw/WwrrcjkeT6Z2w7dFubuUofwfD8Ar61+ZR/s/VCHsbUVFXfpms4SpK", - "e0wVUykNbXHZmooa0/GC/VIEwLvLX3PpK7hj4PaACEgoFpCVmDKwgzjUSGUtfQaR/yp4n6XgrQnAMRKA", - "WrOWTgAsKbtLAPoZcZAA9BFwlwDMZGwNsoHV4D4WTz8xam0I+MOLFwYzhOkCvHyG0DfXxhnCLBMtpQvm", - "WYIDm2Gt1zWC8QcpVSgEYMrRNiWYs22C6JaiMPtYbcNQEEcQE2aJJb4liG5hEFDEpuIad8m8BgH0Ob6Z", - "OrtXiMPpC4PJfsvisS21FYaPKQwxv6s9ESIiu546EQdIA1e42M1+i/3Jbzb1lKR6cu181zGTU+1F+ZUZ", - "3NE4yrbeFBfmv87FXzWBRinpauVWK7daudXKrZWQB1sJWbwAcuy6x1zljnmrHE69tkFtY/Xcq+dePffq", - "uRcuqdlW0tyayaH62WdQN7MqlzmczQwxojflPKU09M69A+fJ+elpGPswPMSMn39zdnbm3X+4/3cAAAD/", - "/5yitW57IQEA", + "H4sIAAAAAAAC/+w9a3PcNpJ/BcW7Kjt145HiPKpOV/7gdZJdXxJHJdl3HxLXLERiZhCRAA2AkrUp/fct", + "kMMXCJIgAXLGNr8k1rDZ3UC/m3j85fk0iilBRHDv4i8vhgxGSCCW/hXiCAv5jwBxn+FYYEq8C+8X+TMm", + "OwBJAC7hDhOYPll5WD7+kCD24K08AiPkXRyQrDzu71EEJTbxEMsHXDBMdt7j48qj2y1H1pQOWHpIsQCx", + "JqXf5M8SpgV1+lY35pihLWKvaEI0I7lMHyLio5zCHsEM54FEBlGjgUgSeRe/e77E+YJQgrz3q1bKl1J2", + "3DHpVCH4C47JLkTP6M2fyBedTFDuevQMiYSRFwzFDHFERK4Ch98jTHAEw/KHdJ7kX5yGiYR9gXeEMvQs", + "SOIQ+1AgXn8cIbarPe0Y31VK4xRGqGWSQbJDg+1IZfUqxdKt7Smld2SEf9BSe5aiqpIM0BYmofAuPCxQ", + "JEWmYYLe/4RDgdiaIHFP2S3P/7HBgUSis+UKRJXelrIISnL+HjLoC8TAHWQPmU/oIk3ZDhL8r3SMfO0z", + "BAUKNlC00a9AaOkLHCEuYBSDeyz2QP4J/pXptDkbAQpRyUZdPtd0K0AGAApiLY6vgmc6Zqt/dQhOBdMy", + "hIlAu1S9RtLPiKlz9gZGCNAtEHsEquCt8ULFOIGqJXHQo2oVCJfSiykTMNxAPw1MG3YD/XW72OwkpaOl", + "/NZOugnoRAwdPCUcsX6GcqjJuGE0RIUm6xgpASbjIR3knxQTqYDZg1Y91YBq+bqhNESQDOKGr29wGGKy", + "22Tv6FmowUwwJ0eMDCoj9dgwo9dXGdn5sYERK1CTyEbSQERgEaII9XKjQE7CkfSOjFRsqsua9cCT8DV/", + "rFY50Hr/erR+R/CHBAEcSEltMWJgS1kau7OXQelkjhY2GgNJnWBRchvwVXlhuuktiWxSLbuD4WD2yje1", + "fMbJTYj9dRxCUoV0wzSL+XB+5UvupzQdYFcMasBNonYSKEYbntwUJqM1ousUDlThVIs6BM0WM2ohNMmg", + "TiQX5lnWY+Kzm4BOJybOuhlyztNs7OjZh8rQ1AWDSk/ze3/hUAeeVEDHLyBUjo5uUyVD/JT09wQy6Coz", + "KKJ/4jY+socTqQlfb+EdZVigDUfsDvtog4PWcKuFNePs9/cjeDuVLoGOp4qp1YKusTeqvjUntyfiMrW8", + "dUXbNvA5+TNP8PUvOQ2KPRwaJ/s9b7tO+M0HYJD4t7/oeKo58hkSm1v0sNlDvm/m2v+AfI8CkMGBW/SQ", + "ptcVHAAmYi9zb7+r7azSmUy7K4QY+pBghlr9gg7UQW+vys2xExWpyDxT56pOdZu6Htpe8SrMMChQ3Rrq", + "WncFBQLpc4AJkNJBXHAQIyY1kZKgrT+iQe6U8YTDHdq0LD/4FX7EURKBFAjAMKT3KEjlhkna46m4lFbu", + "qxSmYr3fh7a+4NhtHvg7hTaEnpUBWZD+HScs5okpIkFM8VF79k1W8n91pGBVEAul7qDdpTZ1oC4NViGH", + "MVOWD+0hp4CYSC+OFnFyVrYwDG+gf3sCKlqykv9rk7CwvQqswDiVTsmH+ouBqlRBHZhOk5f5tbXk4dja", + "ytfQF/iu1XMcnlpkhQWhGyRg6yde+cwFEZ9GmOw2nLYHqyqII5JxItAmIVjwTYzYhqEQPjSzo1eUp9nc", + "4QWQvpBWEwj6e5C9tWrjWUvD3h6O76WO2LMrONhDFpSOBhF4E7aXTXpgF6o0/wq5gnQW/4s42hUndKBu", + "mfmQwBCLB2OJtMK7EErutAMaQUw0tdr/wRAH4PD48Dkbc3B4r7UfUMfqqNva4Hr24FaS7mr61WCmIU/v", + "CWIbGAQMcd7HRx3YMUMCioQbmZYOdBJmMrrdXOS/6vwt+iiMKd7tNthvj8fFc2tKMydTHIXI13RBMrYw", + "2YFXNEyi1Lj1upe+37WYW44z6/38jQYYpWr8ku3S//uUCJQt3Ks0q87+5NlUl0hjRmPExOH1uit8EAjq", + "p7foHf7uVRa0H7YZSIgq0TsSrOMd42KdAfzX6XDxPyQJQ/4iXfEQZyFkcqak0p75/G4GYjUQwRL0uEo1", + "5LkrFWk3wBk1ZEomxiqIBU+D9WM0LZ165BsyBmnIfzK09S68/zgrd6WdZU/5WYFwhNDd4e2UozEZvWgM", + "X39cKaGgfLaqrbt0N/d1rI4FMAL5aCk0aQ0XhYqjIQ8FYOVpVsc7E40Ot2MBjSYxWkxtFIcLS4+pITIt", + "mCo4PpHQ+LQC47MKizsRFO8XUs2ylKVrzgWl4p9IYKPIWAtOR3W8AJvYWgXZANUJlE8oTD69IPnsQuTO", + "BMjNhFe1xPTzrmuJZUinEdUA3LYyKkmNFk6Ook0qh+crr/HJ0plMmpgdC2YkgdHS0dMbLiIdnoacNECr", + "xkdI98IqMU8krIEErIVVpzdeWFU8rcKqABXCci6jqUQzk0QsBdE1/xnqwwsSX7W3oOxZSmLpCVEAbkLq", + "3/p7iAnIwcHTS+rfIgEiiAlBYgUE4iL9BxL++itvpXRH6l/KlAMBqEAXf5C3e8wB5gCCS4YjyB7Az+hh", + "/Udyfv6NH9+epf9A3qq7px7Bj78gshN77+Lb530NmApTzVaMpgGgfh6OYkgw4oAy4Cdc0AgxsGM0iTkQ", + "eyiADwm4QQAKAf09CoCg4DLbNPkyT7zVeap/3C0P7nj17urqxzdvN29f//rj9duXv15WJ8K8C77yxpxm", + "MYqQZnerG7E3PpfnP6hEBx8/YapZ3/+3Zrz1jxnOJaeobnNTcHPoOp1u6Z8oe345YoDREPH03JkYsQhz", + "Lq0g/VrKY+TjLfaVHcBNZZ5L6gbbmBtkf6IM4R2RZKVd/rN3a/Q/D9xtb4GANyF68UR55Qnw089H6oMN", + "Dp4M917ffK/RsebGtnGjlAi4sk2udXwpcGNwh7dcjax2yoYppufnOjvUn5VRGOQWhhwV7+VrC1T7Sk1K", + "t5upsWuw5Lzf3jRR5NckFPiZQAQSUVhS5g3SCiS1wMPm4HQ59o7l7qpubOrJHFaTOHMYGoWieeSF8ZC/", + "+64FX/PgCjucrUdPWCQxY0Kr6gc6D41qeoIaeOkKlPeeuHHbua7tENkwSAIabZIEB09lUjnubIo/yB9k", + "oiSzy03rT6MYMzUtm8nyQ++CdGVhRInYeyvvAUEmfdHAzQ4rr/fkhyGs17ZGjItS+v0NrXEqBW/EqeK9", + "J04qiJU3yZkPdl5m4tRz5WlPYnBXh3XE2VKNuqKr5puFJqOFvo84Bz4lgtFQyWVrTdjZq7K5M+XGNuSR", + "2XLvFuf2rLnyajNzruFYsue+kc1be9ZyY3WPujLJZlaryYtfVp6Cg/3lOxOVuvPA/x5hBug9AazYi5ll", + "zxwJgcnu6M2WUSiKIylMFeRrnYK0HS7Rs3I5Oy62uc6xoAAZgw9fYgneceyEXSzv8NDmifExkl3N6RFW", + "eVbvqQ9jA968yXTniQpGQ5jixAM7HW05sqCvxTJ3nOoJURVf1RGliq/wSni6gziUPqie4GctGzn9fY3+", + "9iMOzPTa1aEE5tScnSQwiuQMtjqkZJ3sE9XK69vQb4783NBCuoss7fqHNmvIgYBEU9ksWW6umjkFU/b6", + "T19iNTb4l1dPREj87ae33srzKY+o9AlXP17Lv//3+rc3z64uX3kr7/+vr72Vt5N/aFS5Z7v/yqtvIxuY", + "gGk2ozVTrhyozLVKaFc9lnnjhHLWQzmDXdZQW2Ci7Cc6PALvrn45dBkOcwbu94iA+KBkhUGBLcTh/Kah", + "njFgmxRoTwqY3uAWlR+u8i1nNVR3mNa0o8MSTJeOFDawZTRKU4LDEpI32SqMhv6XBx30J5b5WQX9kMqB", + "A0YvOD0uwEinP4XOROse/P45HbQaSDVZzf00TZPNgUqTLaFdmWzLFnzzRo1uGUnXVvr+ibXf++6sIzTI", + "LU+YTqu72+3E07pZ3RTtd+fab0raHeeWrCo7x3s2J6686sbvXuDjxKtamMrPIlB0Xr+rEn3MvsT/QH3d", + "xW6Ui51MxsEP1E+iysVhqSi8vRAxvzg7iyUcQ1ysKdudIXJ29/Xz9fkZjPF6L6Iw++S/pamBYBEeNueT", + "ALIAZO4CHNZyrrw7xHhGXeJYPwdP4bfo/Hy7/Sr9xh8jAmPsXXjfrM/X5zI6QrFPWT+T/9lll/zJgJmy", + "+jrwLry/p3f2McRjSngWRZ+fn2uu6Ps5WweaRNLq5A8xIi8vX4MKGHiaeobgMB9fSRnBHZfSeE0EozxG", + "foruvUR1Vl9IKoNLk70f0t/f5JCr2h2Jv+sXt5YgZ91XlD2uehHU7p17fN+YqW91ngq8OqxMrs+Y7fLY", + "fC6LeXv/uGoV6vGm7HDmgQFkdq+jAWB2sZ4pYHqZnQn57MZKA8isg2WsLtktlBptOR+0bL0InGZbk9V4", + "Onw9+wwEOxe629PXr4C3xdtYGi+d4cp7fv69JixAJjAM53QBMRT+vukELuXPJ+U581NOHtpkUTsIpSaR", + "U3O78eGmVWXKKR/veM39ZuWyV9cT+7WmSM0Ky+lnVeYEmg0UXYnBbzXw8TrefSOmSeAxvtzSAlmlArfA", + "UmkUWGCpJPMzp1GONtHkCljXuK6UalG2T0PZlgR0zgS0cd7KLFmoA6r2qWg/Exb5aB9yd0np5A61K0Fd", + "nOonG8EHZp0NhT7lHKA9v7dT2PmS/L7pNs70J55rmfW3bjHtyv0zEgcKV/KV8d6j5U71QdZldle6K5T5", + "amlrfOVmRGtUun2UMxcH4/ch5/qp08WuqmBRw89EDZeyYc6yoeXMv1mKB2e07UsIU1YsCgkzEu7Kielc", + "cFcdsbjhzzcbGJj5tij8SWYV7XWGvULPV2uYzbhxxTHVdDdLDT6wzODOvAp36w0sWx4tvJWr/K2wNfeC", + "W6HTn5DhYrya4xemQVvuLZkIP4u5Hera2TBWmFpOP7DCqRzkYo1LOcTFCt/YHp+KZ2yXr2F9R/tSZ3FQ", + "kd6Rc/NKfPHUi6dePPXiqT9fT730q47Xr+JH6lXx0+hT8Wl7VNN+7p4oKzFuTi2ZyZKZLJnJkpl8UTWk", + "VUPRdrXIVB7frHfLP5nGrdUykUkmudqx1Z7YaNC5Ld9z9FlIYWT0pyEVj/7wIZeorT4TqThtfYuK73h9", + "qsFHfaoKq6qmQZdq0crPUSuXmvwYNbnmJrtZa3Mn9N3V6CbsOKjV+8k4XlPi2kMbVOyLl/5CcoeRebPG", + "Bk4tD+mtUix1fP5ipX/Sh600cTvj+pKFjyhXuFN/w6fxEc56kD2cju/PVRFnR2NPwZ9tu88YvWXbz5zO", + "6PZfD4mqXVrj155Sbo1VPT/ZJcLijCJrpLZNwioudwH5mAtOprkBoN3n82GV/uLQF4e+OPTFoX/eDn3p", + "gR23B8aP2P/ip9P74tP3vaZdp3KcZGZQU2xJaJaEZkloloTmi6tQrTuXtktajhQczHvJ/JNqJFutfDmG", + "LCpd5sp1U/3t5csU2Dpq6+/ZHWWYelTWPviAVr2Fyh0quyhXwalcyWWJrXk/2Nw9uOHXnCmqnil0f2dt", + "0eVFl5f2w0m0HzKTnbnvYEHUWcOhnQf7TkMbboctBoe+ur9xsPjrxV9PWF0V5nIiyUtfsTTOHGavktqm", + "1bw8cjansuhhsX8GWURZ1402V7H/MoVpzC6WfGb3G1WvCxIsQauKmy6uH7p5EAhq7hp6P+DOnHw0T1ns", + "fwUy5rsVpJ1/M5nLH/g4qb9kO520h44uF1WATIT1wwHKWlz6q6cspJXz3yuv1iHMIrHnFiIrh5gLTbkt", + "vkd4f0fkKgV+l6R3bY1kQyXaO+MqXbfzbpwmqxeHDU55RyDoTF+b+PSpqObGs7qFPTqUZVW1OAxFv05d", + "S6jTcwjFAEz0Uz+Gk/cIlTHmcot38SZ1E5s9gkE6kk4BXu7iNIL94wB9eoJsjqhXor2DOnnJ6gZdFfEt", + "etj0OvzLXfwzengdnGJ2VRmEiThbxnHqWVZtlFJ+LRfud30PuM5e+bF4Y3xh3qC+rt6PPqiobKKq3ONp", + "ial+E74lsrGfI5uYjrhctqjMcm6AnJrKDdTlJb+5AjY1ratRvyjZJ6lkSw99zh5606TmaqQ7omzfTTdj", + "xKKlbkJgir66rWPt6qovzvVzieADs0etMp9EHtCeb1sr63yNb5PpHdH9tpvbapa/hWF4A/1b8yz/p+IN", + "ex9RUG/8MtrCmyjtMRVMJSy0xWXrKkpMx0v2cxUA765+Oexxzrjj4H6PCIgZlpCFmnKwhTjUaGWpfQaZ", + "/6J4n6TiLQXAMQqA0rLmLgAsKbsrALoZcVAAdBFwVwBM5GwNqoHF4X4ukX5k1lpT8NPLF3orhPEKPH+F", + "0DXXxhXCJBNdKRfMqwQHPsParksEw/fTFSgkYCLQJiFY8E2M2IahULp4K4YCGkFMuCUWek8Q28AgYIiP", + "xUWQuKfsdvwcQ1/gu7Gze4MEHC8YTHYbToeurCwwfEhgiMVDGYkQkdX12InYQxa4wsXvdhvsjx5ZnNyE", + "2C+K/tHRjK+5gCLhDjFln3THoRi7B7DUGbuQfMya+zqJY8oECsBNSP1bfw8xKb37ltEIiD0Cl9S/RQK8", + "yay66dmNKu3FeS/Oe3Hei/P+op330rc6Qt9q9nbVsbtUUzWnpu1JOU1GDDpRS0KyJCRLQrIkJEs16aKv", + "a9vOdev9+5q4n0Dz1qpn63A2U8SI3eXzJM3rwtsLEV+cnYXUh+GecnHxzfn5uff4/vHfAQAA///1LHFX", + "NBABAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/portal-db/sdk/go/go.mod b/portal-db/sdk/go/go.mod index e649ced68..e61ef7b0d 100644 --- a/portal-db/sdk/go/go.mod +++ b/portal-db/sdk/go/go.mod @@ -1,4 +1,4 @@ -module github.com/grove/path/portal-db/sdk/go +module github.com/buildwithgrove/path/portal-db/sdk/go go 1.22.5 diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go index 80f774695..a2fa23acf 100644 --- a/portal-db/sdk/go/models.go +++ b/portal-db/sdk/go/models.go @@ -60,62 +60,6 @@ const ( PreferReturnReturnRepresentation PreferReturn = "return=representation" ) -// Defines values for DeleteApplicationsParamsPrefer. -const ( - DeleteApplicationsParamsPreferReturnMinimal DeleteApplicationsParamsPrefer = "return=minimal" - DeleteApplicationsParamsPreferReturnNone DeleteApplicationsParamsPrefer = "return=none" - DeleteApplicationsParamsPreferReturnRepresentation DeleteApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetApplicationsParamsPrefer. -const ( - GetApplicationsParamsPreferCountNone GetApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchApplicationsParamsPrefer. -const ( - PatchApplicationsParamsPreferReturnMinimal PatchApplicationsParamsPrefer = "return=minimal" - PatchApplicationsParamsPreferReturnNone PatchApplicationsParamsPrefer = "return=none" - PatchApplicationsParamsPreferReturnRepresentation PatchApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostApplicationsParamsPrefer. -const ( - PostApplicationsParamsPreferResolutionIgnoreDuplicates PostApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostApplicationsParamsPreferResolutionMergeDuplicates PostApplicationsParamsPrefer = "resolution=merge-duplicates" - PostApplicationsParamsPreferReturnMinimal PostApplicationsParamsPrefer = "return=minimal" - PostApplicationsParamsPreferReturnNone PostApplicationsParamsPrefer = "return=none" - PostApplicationsParamsPreferReturnRepresentation PostApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeleteGatewaysParamsPrefer. -const ( - DeleteGatewaysParamsPreferReturnMinimal DeleteGatewaysParamsPrefer = "return=minimal" - DeleteGatewaysParamsPreferReturnNone DeleteGatewaysParamsPrefer = "return=none" - DeleteGatewaysParamsPreferReturnRepresentation DeleteGatewaysParamsPrefer = "return=representation" -) - -// Defines values for GetGatewaysParamsPrefer. -const ( - GetGatewaysParamsPreferCountNone GetGatewaysParamsPrefer = "count=none" -) - -// Defines values for PatchGatewaysParamsPrefer. -const ( - PatchGatewaysParamsPreferReturnMinimal PatchGatewaysParamsPrefer = "return=minimal" - PatchGatewaysParamsPreferReturnNone PatchGatewaysParamsPrefer = "return=none" - PatchGatewaysParamsPreferReturnRepresentation PatchGatewaysParamsPrefer = "return=representation" -) - -// Defines values for PostGatewaysParamsPrefer. -const ( - PostGatewaysParamsPreferResolutionIgnoreDuplicates PostGatewaysParamsPrefer = "resolution=ignore-duplicates" - PostGatewaysParamsPreferResolutionMergeDuplicates PostGatewaysParamsPrefer = "resolution=merge-duplicates" - PostGatewaysParamsPreferReturnMinimal PostGatewaysParamsPrefer = "return=minimal" - PostGatewaysParamsPreferReturnNone PostGatewaysParamsPrefer = "return=none" - PostGatewaysParamsPreferReturnRepresentation PostGatewaysParamsPrefer = "return=representation" -) - // Defines values for DeleteNetworksParamsPrefer. const ( DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" @@ -172,6 +116,34 @@ const ( PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" ) +// Defines values for DeletePortalAccountRbacParamsPrefer. +const ( + DeletePortalAccountRbacParamsPreferReturnMinimal DeletePortalAccountRbacParamsPrefer = "return=minimal" + DeletePortalAccountRbacParamsPreferReturnNone DeletePortalAccountRbacParamsPrefer = "return=none" + DeletePortalAccountRbacParamsPreferReturnRepresentation DeletePortalAccountRbacParamsPrefer = "return=representation" +) + +// Defines values for GetPortalAccountRbacParamsPrefer. +const ( + GetPortalAccountRbacParamsPreferCountNone GetPortalAccountRbacParamsPrefer = "count=none" +) + +// Defines values for PatchPortalAccountRbacParamsPrefer. +const ( + PatchPortalAccountRbacParamsPreferReturnMinimal PatchPortalAccountRbacParamsPrefer = "return=minimal" + PatchPortalAccountRbacParamsPreferReturnNone PatchPortalAccountRbacParamsPrefer = "return=none" + PatchPortalAccountRbacParamsPreferReturnRepresentation PatchPortalAccountRbacParamsPrefer = "return=representation" +) + +// Defines values for PostPortalAccountRbacParamsPrefer. +const ( + PostPortalAccountRbacParamsPreferResolutionIgnoreDuplicates PostPortalAccountRbacParamsPrefer = "resolution=ignore-duplicates" + PostPortalAccountRbacParamsPreferResolutionMergeDuplicates PostPortalAccountRbacParamsPrefer = "resolution=merge-duplicates" + PostPortalAccountRbacParamsPreferReturnMinimal PostPortalAccountRbacParamsPrefer = "return=minimal" + PostPortalAccountRbacParamsPreferReturnNone PostPortalAccountRbacParamsPrefer = "return=none" + PostPortalAccountRbacParamsPreferReturnRepresentation PostPortalAccountRbacParamsPrefer = "return=representation" +) + // Defines values for DeletePortalAccountsParamsPrefer. const ( DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" @@ -200,6 +172,34 @@ const ( PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" ) +// Defines values for DeletePortalApplicationRbacParamsPrefer. +const ( + DeletePortalApplicationRbacParamsPreferReturnMinimal DeletePortalApplicationRbacParamsPrefer = "return=minimal" + DeletePortalApplicationRbacParamsPreferReturnNone DeletePortalApplicationRbacParamsPrefer = "return=none" + DeletePortalApplicationRbacParamsPreferReturnRepresentation DeletePortalApplicationRbacParamsPrefer = "return=representation" +) + +// Defines values for GetPortalApplicationRbacParamsPrefer. +const ( + GetPortalApplicationRbacParamsPreferCountNone GetPortalApplicationRbacParamsPrefer = "count=none" +) + +// Defines values for PatchPortalApplicationRbacParamsPrefer. +const ( + PatchPortalApplicationRbacParamsPreferReturnMinimal PatchPortalApplicationRbacParamsPrefer = "return=minimal" + PatchPortalApplicationRbacParamsPreferReturnNone PatchPortalApplicationRbacParamsPrefer = "return=none" + PatchPortalApplicationRbacParamsPreferReturnRepresentation PatchPortalApplicationRbacParamsPrefer = "return=representation" +) + +// Defines values for PostPortalApplicationRbacParamsPrefer. +const ( + PostPortalApplicationRbacParamsPreferResolutionIgnoreDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=ignore-duplicates" + PostPortalApplicationRbacParamsPreferResolutionMergeDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=merge-duplicates" + PostPortalApplicationRbacParamsPreferReturnMinimal PostPortalApplicationRbacParamsPrefer = "return=minimal" + PostPortalApplicationRbacParamsPreferReturnNone PostPortalApplicationRbacParamsPrefer = "return=none" + PostPortalApplicationRbacParamsPreferReturnRepresentation PostPortalApplicationRbacParamsPrefer = "return=representation" +) + // Defines values for DeletePortalApplicationsParamsPrefer. const ( DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" @@ -256,14 +256,34 @@ const ( PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" ) -// Defines values for PostRpcCreatePortalApplicationParamsPrefer. +// Defines values for PostRpcArmorParamsPrefer. const ( - PostRpcCreatePortalApplicationParamsPreferParamsSingleObject PostRpcCreatePortalApplicationParamsPrefer = "params=single-object" + PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" ) -// Defines values for PostRpcMeParamsPrefer. +// Defines values for PostRpcDearmorParamsPrefer. const ( - ParamsSingleObject PostRpcMeParamsPrefer = "params=single-object" + PostRpcDearmorParamsPreferParamsSingleObject PostRpcDearmorParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcGenRandomUuidParamsPrefer. +const ( + PostRpcGenRandomUuidParamsPreferParamsSingleObject PostRpcGenRandomUuidParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcGenSaltParamsPrefer. +const ( + PostRpcGenSaltParamsPreferParamsSingleObject PostRpcGenSaltParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcPgpArmorHeadersParamsPrefer. +const ( + PostRpcPgpArmorHeadersParamsPreferParamsSingleObject PostRpcPgpArmorHeadersParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcPgpKeyIdParamsPrefer. +const ( + ParamsSingleObject PostRpcPgpKeyIdParamsPrefer = "params=single-object" ) // Defines values for DeleteServiceEndpointsParamsPrefer. @@ -350,53 +370,6 @@ const ( PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" ) -// Applications Onchain applications for processing relays through the network -type Applications struct { - // ApplicationAddress Blockchain address of the application - // - // Note: - // This is a Primary Key. - ApplicationAddress string `json:"application_address"` - ApplicationPrivateKeyHex *string `json:"application_private_key_hex,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Note: - // This is a Foreign Key to `gateways.gateway_address`. - GatewayAddress string `json:"gateway_address"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - StakeAmount *int `json:"stake_amount,omitempty"` - StakeDenom *string `json:"stake_denom,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Gateways Onchain gateway information including stake and network details -type Gateways struct { - CreatedAt *string `json:"created_at,omitempty"` - - // GatewayAddress Blockchain address of the gateway - // - // Note: - // This is a Primary Key. - GatewayAddress string `json:"gateway_address"` - GatewayPrivateKeyHex *string `json:"gateway_private_key_hex,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId string `json:"network_id"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount int `json:"stake_amount"` - StakeDenom string `json:"stake_denom"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - // Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) type Networks struct { // NetworkId Note: @@ -420,6 +393,23 @@ type Organizations struct { UpdatedAt *string `json:"updated_at,omitempty"` } +// PortalAccountRbac User roles and permissions for specific portal accounts +type PortalAccountRbac struct { + // Id Note: + // This is a Primary Key. + Id int `json:"id"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId string `json:"portal_account_id"` + + // PortalUserId Note: + // This is a Foreign Key to `portal_users.portal_user_id`. + PortalUserId string `json:"portal_user_id"` + RoleName string `json:"role_name"` + UserJoinedAccount *bool `json:"user_joined_account,omitempty"` +} + // PortalAccounts Multi-tenant accounts with plans and billing integration type PortalAccounts struct { BillingType *string `json:"billing_type,omitempty"` @@ -455,6 +445,24 @@ type PortalAccounts struct { // PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. type PortalAccountsPortalAccountUserLimitInterval string +// PortalApplicationRbac User access controls for specific applications +type PortalApplicationRbac struct { + CreatedAt *string `json:"created_at,omitempty"` + + // Id Note: + // This is a Primary Key. + Id int `json:"id"` + + // PortalApplicationId Note: + // This is a Foreign Key to `portal_applications.portal_application_id`. + PortalApplicationId string `json:"portal_application_id"` + + // PortalUserId Note: + // This is a Foreign Key to `portal_users.portal_user_id`. + PortalUserId string `json:"portal_user_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + // PortalApplications Applications created within portal accounts with their own rate limits and settings type PortalApplications struct { CreatedAt *string `json:"created_at,omitempty"` @@ -552,6 +560,7 @@ type Services struct { // NetworkId Note: // This is a Foreign Key to `networks.network_id`. NetworkId *string `json:"network_id,omitempty"` + PublicEndpointUrl *string `json:"public_endpoint_url,omitempty"` QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` // ServiceDomains Valid domains for this service @@ -562,6 +571,8 @@ type Services struct { ServiceId string `json:"service_id"` ServiceName string `json:"service_name"` ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` + StatusEndpointUrl *string `json:"status_endpoint_url,omitempty"` + StatusQuery *string `json:"status_query,omitempty"` SvgIcon *string `json:"svg_icon,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` } @@ -593,54 +604,6 @@ type Range = string // RangeUnit defines model for rangeUnit. type RangeUnit = string -// RowFilterApplicationsApplicationAddress defines model for rowFilter.applications.application_address. -type RowFilterApplicationsApplicationAddress = string - -// RowFilterApplicationsApplicationPrivateKeyHex defines model for rowFilter.applications.application_private_key_hex. -type RowFilterApplicationsApplicationPrivateKeyHex = string - -// RowFilterApplicationsCreatedAt defines model for rowFilter.applications.created_at. -type RowFilterApplicationsCreatedAt = string - -// RowFilterApplicationsGatewayAddress defines model for rowFilter.applications.gateway_address. -type RowFilterApplicationsGatewayAddress = string - -// RowFilterApplicationsNetworkId defines model for rowFilter.applications.network_id. -type RowFilterApplicationsNetworkId = string - -// RowFilterApplicationsServiceId defines model for rowFilter.applications.service_id. -type RowFilterApplicationsServiceId = string - -// RowFilterApplicationsStakeAmount defines model for rowFilter.applications.stake_amount. -type RowFilterApplicationsStakeAmount = string - -// RowFilterApplicationsStakeDenom defines model for rowFilter.applications.stake_denom. -type RowFilterApplicationsStakeDenom = string - -// RowFilterApplicationsUpdatedAt defines model for rowFilter.applications.updated_at. -type RowFilterApplicationsUpdatedAt = string - -// RowFilterGatewaysCreatedAt defines model for rowFilter.gateways.created_at. -type RowFilterGatewaysCreatedAt = string - -// RowFilterGatewaysGatewayAddress defines model for rowFilter.gateways.gateway_address. -type RowFilterGatewaysGatewayAddress = string - -// RowFilterGatewaysGatewayPrivateKeyHex defines model for rowFilter.gateways.gateway_private_key_hex. -type RowFilterGatewaysGatewayPrivateKeyHex = string - -// RowFilterGatewaysNetworkId defines model for rowFilter.gateways.network_id. -type RowFilterGatewaysNetworkId = string - -// RowFilterGatewaysStakeAmount defines model for rowFilter.gateways.stake_amount. -type RowFilterGatewaysStakeAmount = string - -// RowFilterGatewaysStakeDenom defines model for rowFilter.gateways.stake_denom. -type RowFilterGatewaysStakeDenom = string - -// RowFilterGatewaysUpdatedAt defines model for rowFilter.gateways.updated_at. -type RowFilterGatewaysUpdatedAt = string - // RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. type RowFilterNetworksNetworkId = string @@ -659,6 +622,21 @@ type RowFilterOrganizationsOrganizationName = string // RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. type RowFilterOrganizationsUpdatedAt = string +// RowFilterPortalAccountRbacId defines model for rowFilter.portal_account_rbac.id. +type RowFilterPortalAccountRbacId = string + +// RowFilterPortalAccountRbacPortalAccountId defines model for rowFilter.portal_account_rbac.portal_account_id. +type RowFilterPortalAccountRbacPortalAccountId = string + +// RowFilterPortalAccountRbacPortalUserId defines model for rowFilter.portal_account_rbac.portal_user_id. +type RowFilterPortalAccountRbacPortalUserId = string + +// RowFilterPortalAccountRbacRoleName defines model for rowFilter.portal_account_rbac.role_name. +type RowFilterPortalAccountRbacRoleName = string + +// RowFilterPortalAccountRbacUserJoinedAccount defines model for rowFilter.portal_account_rbac.user_joined_account. +type RowFilterPortalAccountRbacUserJoinedAccount = string + // RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. type RowFilterPortalAccountsBillingType = string @@ -704,6 +682,21 @@ type RowFilterPortalAccountsUpdatedAt = string // RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. type RowFilterPortalAccountsUserAccountName = string +// RowFilterPortalApplicationRbacCreatedAt defines model for rowFilter.portal_application_rbac.created_at. +type RowFilterPortalApplicationRbacCreatedAt = string + +// RowFilterPortalApplicationRbacId defines model for rowFilter.portal_application_rbac.id. +type RowFilterPortalApplicationRbacId = string + +// RowFilterPortalApplicationRbacPortalApplicationId defines model for rowFilter.portal_application_rbac.portal_application_id. +type RowFilterPortalApplicationRbacPortalApplicationId = string + +// RowFilterPortalApplicationRbacPortalUserId defines model for rowFilter.portal_application_rbac.portal_user_id. +type RowFilterPortalApplicationRbacPortalUserId = string + +// RowFilterPortalApplicationRbacUpdatedAt defines model for rowFilter.portal_application_rbac.updated_at. +type RowFilterPortalApplicationRbacUpdatedAt = string + // RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. type RowFilterPortalApplicationsCreatedAt = string @@ -818,6 +811,9 @@ type RowFilterServicesHardFallbackEnabled = string // RowFilterServicesNetworkId defines model for rowFilter.services.network_id. type RowFilterServicesNetworkId = string +// RowFilterServicesPublicEndpointUrl defines model for rowFilter.services.public_endpoint_url. +type RowFilterServicesPublicEndpointUrl = string + // RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. type RowFilterServicesQualityFallbackEnabled = string @@ -833,6 +829,12 @@ type RowFilterServicesServiceName = string // RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. type RowFilterServicesServiceOwnerAddress = string +// RowFilterServicesStatusEndpointUrl defines model for rowFilter.services.status_endpoint_url. +type RowFilterServicesStatusEndpointUrl = string + +// RowFilterServicesStatusQuery defines model for rowFilter.services.status_query. +type RowFilterServicesStatusQuery = string + // RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. type RowFilterServicesSvgIcon = string @@ -842,186 +844,16 @@ type RowFilterServicesUpdatedAt = string // Select defines model for select. type Select = string -// DeleteApplicationsParams defines parameters for DeleteApplications. -type DeleteApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteApplicationsParamsPrefer defines parameters for DeleteApplications. -type DeleteApplicationsParamsPrefer string - -// GetApplicationsParams defines parameters for GetApplications. -type GetApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetApplicationsParamsPrefer defines parameters for GetApplications. -type GetApplicationsParamsPrefer string - -// PatchApplicationsParams defines parameters for PatchApplications. -type PatchApplicationsParams struct { - // ApplicationAddress Blockchain address of the application - ApplicationAddress *RowFilterApplicationsApplicationAddress `form:"application_address,omitempty" json:"application_address,omitempty"` - GatewayAddress *RowFilterApplicationsGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - ServiceId *RowFilterApplicationsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - StakeAmount *RowFilterApplicationsStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterApplicationsStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - ApplicationPrivateKeyHex *RowFilterApplicationsApplicationPrivateKeyHex `form:"application_private_key_hex,omitempty" json:"application_private_key_hex,omitempty"` - NetworkId *RowFilterApplicationsNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - CreatedAt *RowFilterApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchApplicationsParamsPrefer defines parameters for PatchApplications. -type PatchApplicationsParamsPrefer string - -// PostApplicationsParams defines parameters for PostApplications. -type PostApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostApplicationsParamsPrefer defines parameters for PostApplications. -type PostApplicationsParamsPrefer string - -// DeleteGatewaysParams defines parameters for DeleteGateways. -type DeleteGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteGatewaysParamsPrefer defines parameters for DeleteGateways. -type DeleteGatewaysParamsPrefer string - -// GetGatewaysParams defines parameters for GetGateways. -type GetGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetGatewaysParamsPrefer `json:"Prefer,omitempty"` -} - -// GetGatewaysParamsPrefer defines parameters for GetGateways. -type GetGatewaysParamsPrefer string - -// PatchGatewaysParams defines parameters for PatchGateways. -type PatchGatewaysParams struct { - // GatewayAddress Blockchain address of the gateway - GatewayAddress *RowFilterGatewaysGatewayAddress `form:"gateway_address,omitempty" json:"gateway_address,omitempty"` - - // StakeAmount Amount of tokens staked by the gateway - StakeAmount *RowFilterGatewaysStakeAmount `form:"stake_amount,omitempty" json:"stake_amount,omitempty"` - StakeDenom *RowFilterGatewaysStakeDenom `form:"stake_denom,omitempty" json:"stake_denom,omitempty"` - NetworkId *RowFilterGatewaysNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - GatewayPrivateKeyHex *RowFilterGatewaysGatewayPrivateKeyHex `form:"gateway_private_key_hex,omitempty" json:"gateway_private_key_hex,omitempty"` - CreatedAt *RowFilterGatewaysCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterGatewaysUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchGatewaysParamsPrefer `json:"Prefer,omitempty"` +// Args defines model for Args. +type Args struct { + Empty string `json:""` } -// PatchGatewaysParamsPrefer defines parameters for PatchGateways. -type PatchGatewaysParamsPrefer string - -// PostGatewaysParams defines parameters for PostGateways. -type PostGatewaysParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostGatewaysParamsPrefer `json:"Prefer,omitempty"` +// Args2 defines model for Args2. +type Args2 struct { + Empty string `json:""` } -// PostGatewaysParamsPrefer defines parameters for PostGateways. -type PostGatewaysParamsPrefer string - // DeleteNetworksParams defines parameters for DeleteNetworks. type DeleteNetworksParams struct { NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` @@ -1172,6 +1004,81 @@ type PostOrganizationsParams struct { // PostOrganizationsParamsPrefer defines parameters for PostOrganizations. type PostOrganizationsParamsPrefer string +// DeletePortalAccountRbacParams defines parameters for DeletePortalAccountRbac. +type DeletePortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountRbacParamsPrefer defines parameters for DeletePortalAccountRbac. +type DeletePortalAccountRbacParamsPrefer string + +// GetPortalAccountRbacParams defines parameters for GetPortalAccountRbac. +type GetPortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountRbacParamsPrefer defines parameters for GetPortalAccountRbac. +type GetPortalAccountRbacParamsPrefer string + +// PatchPortalAccountRbacParams defines parameters for PatchPortalAccountRbac. +type PatchPortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountRbacParamsPrefer defines parameters for PatchPortalAccountRbac. +type PatchPortalAccountRbacParamsPrefer string + +// PostPortalAccountRbacParams defines parameters for PostPortalAccountRbac. +type PostPortalAccountRbacParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountRbacParamsPrefer defines parameters for PostPortalAccountRbac. +type PostPortalAccountRbacParamsPrefer string + // DeletePortalAccountsParams defines parameters for DeletePortalAccounts. type DeletePortalAccountsParams struct { // PortalAccountId Unique identifier for the portal account @@ -1286,6 +1193,81 @@ type PostPortalAccountsParams struct { // PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. type PostPortalAccountsParamsPrefer string +// DeletePortalApplicationRbacParams defines parameters for DeletePortalApplicationRbac. +type DeletePortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationRbacParamsPrefer defines parameters for DeletePortalApplicationRbac. +type DeletePortalApplicationRbacParamsPrefer string + +// GetPortalApplicationRbacParams defines parameters for GetPortalApplicationRbac. +type GetPortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationRbacParamsPrefer defines parameters for GetPortalApplicationRbac. +type GetPortalApplicationRbacParamsPrefer string + +// PatchPortalApplicationRbacParams defines parameters for PatchPortalApplicationRbac. +type PatchPortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalApplicationRbacParamsPrefer defines parameters for PatchPortalApplicationRbac. +type PatchPortalApplicationRbacParamsPrefer string + +// PostPortalApplicationRbacParams defines parameters for PostPortalApplicationRbac. +type PostPortalApplicationRbacParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalApplicationRbacParamsPrefer defines parameters for PostPortalApplicationRbac. +type PostPortalApplicationRbacParamsPrefer string + // DeletePortalApplicationsParams defines parameters for DeletePortalApplications. type DeletePortalApplicationsParams struct { PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` @@ -1484,88 +1466,168 @@ type PostPortalPlansParams struct { // PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. type PostPortalPlansParamsPrefer string -// GetRpcCreatePortalApplicationParams defines parameters for GetRpcCreatePortalApplication. -type GetRpcCreatePortalApplicationParams struct { - PPortalAccountId string `form:"p_portal_account_id" json:"p_portal_account_id"` - PPortalUserId string `form:"p_portal_user_id" json:"p_portal_user_id"` - PPortalApplicationName *string `form:"p_portal_application_name,omitempty" json:"p_portal_application_name,omitempty"` - PEmoji *string `form:"p_emoji,omitempty" json:"p_emoji,omitempty"` - PPortalApplicationUserLimit *int `form:"p_portal_application_user_limit,omitempty" json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `form:"p_portal_application_user_limit_interval,omitempty" json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `form:"p_portal_application_user_limit_rps,omitempty" json:"p_portal_application_user_limit_rps,omitempty"` - PPortalApplicationDescription *string `form:"p_portal_application_description,omitempty" json:"p_portal_application_description,omitempty"` - PFavoriteServiceIds *string `form:"p_favorite_service_ids,omitempty" json:"p_favorite_service_ids,omitempty"` - PSecretKeyRequired *string `form:"p_secret_key_required,omitempty" json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationJSONBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationJSONBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { - PEmoji *string `json:"p_emoji,omitempty"` - PFavoriteServiceIds *[]string `json:"p_favorite_service_ids,omitempty"` - PPortalAccountId string `json:"p_portal_account_id"` - PPortalApplicationDescription *string `json:"p_portal_application_description,omitempty"` - PPortalApplicationName *string `json:"p_portal_application_name,omitempty"` - PPortalApplicationUserLimit *int `json:"p_portal_application_user_limit,omitempty"` - PPortalApplicationUserLimitInterval *string `json:"p_portal_application_user_limit_interval,omitempty"` - PPortalApplicationUserLimitRps *int `json:"p_portal_application_user_limit_rps,omitempty"` - PPortalUserId string `json:"p_portal_user_id"` - PSecretKeyRequired *string `json:"p_secret_key_required,omitempty"` -} - -// PostRpcCreatePortalApplicationParams defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationParams struct { +// GetRpcArmorParams defines parameters for GetRpcArmor. +type GetRpcArmorParams struct { + Empty string `form:"" json:""` +} + +// PostRpcArmorJSONBody defines parameters for PostRpcArmor. +type PostRpcArmorJSONBody struct { + Empty string `json:""` +} + +// PostRpcArmorApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcArmor. +type PostRpcArmorApplicationVndPgrstObjectPlusJSONBody struct { + Empty string `json:""` +} + +// PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcArmor. +type PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + Empty string `json:""` +} + +// PostRpcArmorParams defines parameters for PostRpcArmor. +type PostRpcArmorParams struct { + // Prefer Preference + Prefer *PostRpcArmorParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcArmorParamsPrefer defines parameters for PostRpcArmor. +type PostRpcArmorParamsPrefer string + +// GetRpcDearmorParams defines parameters for GetRpcDearmor. +type GetRpcDearmorParams struct { + Empty string `form:"" json:""` +} + +// PostRpcDearmorJSONBody defines parameters for PostRpcDearmor. +type PostRpcDearmorJSONBody struct { + Empty string `json:""` +} + +// PostRpcDearmorApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcDearmor. +type PostRpcDearmorApplicationVndPgrstObjectPlusJSONBody struct { + Empty string `json:""` +} + +// PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcDearmor. +type PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + Empty string `json:""` +} + +// PostRpcDearmorParams defines parameters for PostRpcDearmor. +type PostRpcDearmorParams struct { + // Prefer Preference + Prefer *PostRpcDearmorParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcDearmorParamsPrefer defines parameters for PostRpcDearmor. +type PostRpcDearmorParamsPrefer string + +// PostRpcGenRandomUuidJSONBody defines parameters for PostRpcGenRandomUuid. +type PostRpcGenRandomUuidJSONBody = map[string]interface{} + +// PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcGenRandomUuid. +type PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} + +// PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcGenRandomUuid. +type PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} + +// PostRpcGenRandomUuidParams defines parameters for PostRpcGenRandomUuid. +type PostRpcGenRandomUuidParams struct { + // Prefer Preference + Prefer *PostRpcGenRandomUuidParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcGenRandomUuidParamsPrefer defines parameters for PostRpcGenRandomUuid. +type PostRpcGenRandomUuidParamsPrefer string + +// GetRpcGenSaltParams defines parameters for GetRpcGenSalt. +type GetRpcGenSaltParams struct { + Empty string `form:"" json:""` +} + +// PostRpcGenSaltJSONBody defines parameters for PostRpcGenSalt. +type PostRpcGenSaltJSONBody struct { + Empty string `json:""` +} + +// PostRpcGenSaltApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcGenSalt. +type PostRpcGenSaltApplicationVndPgrstObjectPlusJSONBody struct { + Empty string `json:""` +} + +// PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcGenSalt. +type PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + Empty string `json:""` +} + +// PostRpcGenSaltParams defines parameters for PostRpcGenSalt. +type PostRpcGenSaltParams struct { // Prefer Preference - Prefer *PostRpcCreatePortalApplicationParamsPrefer `json:"Prefer,omitempty"` + Prefer *PostRpcGenSaltParamsPrefer `json:"Prefer,omitempty"` } -// PostRpcCreatePortalApplicationParamsPrefer defines parameters for PostRpcCreatePortalApplication. -type PostRpcCreatePortalApplicationParamsPrefer string +// PostRpcGenSaltParamsPrefer defines parameters for PostRpcGenSalt. +type PostRpcGenSaltParamsPrefer string -// PostRpcMeJSONBody defines parameters for PostRpcMe. -type PostRpcMeJSONBody = map[string]interface{} +// GetRpcPgpArmorHeadersParams defines parameters for GetRpcPgpArmorHeaders. +type GetRpcPgpArmorHeadersParams struct { + Empty string `form:"" json:""` +} + +// PostRpcPgpArmorHeadersJSONBody defines parameters for PostRpcPgpArmorHeaders. +type PostRpcPgpArmorHeadersJSONBody struct { + Empty string `json:""` +} -// PostRpcMeApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONBody = map[string]interface{} +// PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcPgpArmorHeaders. +type PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONBody struct { + Empty string `json:""` +} -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcMe. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody = map[string]interface{} +// PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcPgpArmorHeaders. +type PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + Empty string `json:""` +} -// PostRpcMeParams defines parameters for PostRpcMe. -type PostRpcMeParams struct { +// PostRpcPgpArmorHeadersParams defines parameters for PostRpcPgpArmorHeaders. +type PostRpcPgpArmorHeadersParams struct { // Prefer Preference - Prefer *PostRpcMeParamsPrefer `json:"Prefer,omitempty"` + Prefer *PostRpcPgpArmorHeadersParamsPrefer `json:"Prefer,omitempty"` } -// PostRpcMeParamsPrefer defines parameters for PostRpcMe. -type PostRpcMeParamsPrefer string +// PostRpcPgpArmorHeadersParamsPrefer defines parameters for PostRpcPgpArmorHeaders. +type PostRpcPgpArmorHeadersParamsPrefer string + +// GetRpcPgpKeyIdParams defines parameters for GetRpcPgpKeyId. +type GetRpcPgpKeyIdParams struct { + Empty string `form:"" json:""` +} + +// PostRpcPgpKeyIdJSONBody defines parameters for PostRpcPgpKeyId. +type PostRpcPgpKeyIdJSONBody struct { + Empty string `json:""` +} + +// PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONBody defines parameters for PostRpcPgpKeyId. +type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONBody struct { + Empty string `json:""` +} + +// PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedBody defines parameters for PostRpcPgpKeyId. +type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedBody struct { + Empty string `json:""` +} + +// PostRpcPgpKeyIdParams defines parameters for PostRpcPgpKeyId. +type PostRpcPgpKeyIdParams struct { + // Prefer Preference + Prefer *PostRpcPgpKeyIdParamsPrefer `json:"Prefer,omitempty"` +} + +// PostRpcPgpKeyIdParamsPrefer defines parameters for PostRpcPgpKeyId. +type PostRpcPgpKeyIdParamsPrefer string // DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. type DeleteServiceEndpointsParams struct { @@ -1735,6 +1797,9 @@ type DeleteServicesParams struct { QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` @@ -1764,6 +1829,9 @@ type GetServicesParams struct { QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` @@ -1811,6 +1879,9 @@ type PatchServicesParams struct { QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` @@ -1834,42 +1905,6 @@ type PostServicesParams struct { // PostServicesParamsPrefer defines parameters for PostServices. type PostServicesParamsPrefer string -// PatchApplicationsJSONRequestBody defines body for PatchApplications for application/json ContentType. -type PatchApplicationsJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PostApplicationsJSONRequestBody defines body for PostApplications for application/json ContentType. -type PostApplicationsJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostApplications for application/vnd.pgrst.object+json ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = Applications - -// PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Applications - -// PatchGatewaysJSONRequestBody defines body for PatchGateways for application/json ContentType. -type PatchGatewaysJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - -// PostGatewaysJSONRequestBody defines body for PostGateways for application/json ContentType. -type PostGatewaysJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostGateways for application/vnd.pgrst.object+json ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONRequestBody = Gateways - -// PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostGateways for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostGatewaysApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Gateways - // PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. type PatchNetworksJSONRequestBody = Networks @@ -1906,6 +1941,24 @@ type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizatio // PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations +// PatchPortalAccountRbacJSONRequestBody defines body for PatchPortalAccountRbac for application/json ContentType. +type PatchPortalAccountRbacJSONRequestBody = PortalAccountRbac + +// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac + +// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac + +// PostPortalAccountRbacJSONRequestBody defines body for PostPortalAccountRbac for application/json ContentType. +type PostPortalAccountRbacJSONRequestBody = PortalAccountRbac + +// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac + +// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac + // PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. type PatchPortalAccountsJSONRequestBody = PortalAccounts @@ -1924,6 +1977,24 @@ type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAcco // PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts +// PatchPortalApplicationRbacJSONRequestBody defines body for PatchPortalApplicationRbac for application/json ContentType. +type PatchPortalApplicationRbacJSONRequestBody = PortalApplicationRbac + +// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac + +// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacJSONRequestBody defines body for PostPortalApplicationRbac for application/json ContentType. +type PostPortalApplicationRbacJSONRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac + // PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. type PatchPortalApplicationsJSONRequestBody = PortalApplications @@ -1960,23 +2031,59 @@ type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans // PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans -// PostRpcCreatePortalApplicationJSONRequestBody defines body for PostRpcCreatePortalApplication for application/json ContentType. -type PostRpcCreatePortalApplicationJSONRequestBody PostRpcCreatePortalApplicationJSONBody +// PostRpcArmorJSONRequestBody defines body for PostRpcArmor for application/json ContentType. +type PostRpcArmorJSONRequestBody PostRpcArmorJSONBody + +// PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcArmor for application/vnd.pgrst.object+json ContentType. +type PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody PostRpcArmorApplicationVndPgrstObjectPlusJSONBody + +// PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcArmor for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcDearmorJSONRequestBody defines body for PostRpcDearmor for application/json ContentType. +type PostRpcDearmorJSONRequestBody PostRpcDearmorJSONBody + +// PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcDearmor for application/vnd.pgrst.object+json ContentType. +type PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody PostRpcDearmorApplicationVndPgrstObjectPlusJSONBody + +// PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcDearmor for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcGenRandomUuidJSONRequestBody defines body for PostRpcGenRandomUuid for application/json ContentType. +type PostRpcGenRandomUuidJSONRequestBody = PostRpcGenRandomUuidJSONBody + +// PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcGenRandomUuid for application/vnd.pgrst.object+json ContentType. +type PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONBody + +// PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcGenRandomUuid for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcGenSaltJSONRequestBody defines body for PostRpcGenSalt for application/json ContentType. +type PostRpcGenSaltJSONRequestBody PostRpcGenSaltJSONBody + +// PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcGenSalt for application/vnd.pgrst.object+json ContentType. +type PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody PostRpcGenSaltApplicationVndPgrstObjectPlusJSONBody + +// PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcGenSalt for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PostRpcPgpArmorHeadersJSONRequestBody defines body for PostRpcPgpArmorHeaders for application/json ContentType. +type PostRpcPgpArmorHeadersJSONRequestBody PostRpcPgpArmorHeadersJSONBody -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json ContentType. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONBody +// PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcPgpArmorHeaders for application/vnd.pgrst.object+json ContentType. +type PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONBody -// PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcCreatePortalApplication for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcCreatePortalApplicationApplicationVndPgrstObjectPlusJSONNullsStrippedBody +// PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcPgpArmorHeaders for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedBody -// PostRpcMeJSONRequestBody defines body for PostRpcMe for application/json ContentType. -type PostRpcMeJSONRequestBody = PostRpcMeJSONBody +// PostRpcPgpKeyIdJSONRequestBody defines body for PostRpcPgpKeyId for application/json ContentType. +type PostRpcPgpKeyIdJSONRequestBody PostRpcPgpKeyIdJSONBody -// PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONBody +// PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostRpcPgpKeyId for application/vnd.pgrst.object+json ContentType. +type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONBody -// PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcMe for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PostRpcMeApplicationVndPgrstObjectPlusJSONNullsStrippedBody +// PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcPgpKeyId for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedBody // PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES index 69e5bde07..62c8d8dfa 100644 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -1,29 +1,34 @@ .gitignore .npmignore package.json -src/apis/ApplicationsApi.ts -src/apis/GatewaysApi.ts src/apis/IntrospectionApi.ts src/apis/NetworksApi.ts src/apis/OrganizationsApi.ts +src/apis/PortalAccountRbacApi.ts src/apis/PortalAccountsApi.ts +src/apis/PortalApplicationRbacApi.ts src/apis/PortalApplicationsApi.ts src/apis/PortalPlansApi.ts -src/apis/RpcCreatePortalApplicationApi.ts -src/apis/RpcMeApi.ts +src/apis/RpcArmorApi.ts +src/apis/RpcDearmorApi.ts +src/apis/RpcGenRandomUuidApi.ts +src/apis/RpcGenSaltApi.ts +src/apis/RpcPgpArmorHeadersApi.ts +src/apis/RpcPgpKeyIdApi.ts src/apis/ServiceEndpointsApi.ts src/apis/ServiceFallbacksApi.ts src/apis/ServicesApi.ts src/apis/index.ts src/index.ts -src/models/Applications.ts -src/models/Gateways.ts src/models/Networks.ts src/models/Organizations.ts +src/models/PortalAccountRbac.ts src/models/PortalAccounts.ts +src/models/PortalApplicationRbac.ts src/models/PortalApplications.ts src/models/PortalPlans.ts -src/models/RpcCreatePortalApplicationPostRequest.ts +src/models/RpcArmorPostRequest.ts +src/models/RpcGenSaltPostRequest.ts src/models/ServiceEndpoints.ts src/models/ServiceFallbacks.ts src/models/Services.ts diff --git a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts deleted file mode 100644 index a7a0827f0..000000000 --- a/portal-db/sdk/typescript/src/apis/ApplicationsApi.ts +++ /dev/null @@ -1,397 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Applications, -} from '../models/index'; -import { - ApplicationsFromJSON, - ApplicationsToJSON, -} from '../models/index'; - -export interface ApplicationsDeleteRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ApplicationsDeletePreferEnum; -} - -export interface ApplicationsGetRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ApplicationsGetPreferEnum; -} - -export interface ApplicationsPatchRequest { - applicationAddress?: string; - gatewayAddress?: string; - serviceId?: string; - stakeAmount?: string; - stakeDenom?: string; - applicationPrivateKeyHex?: string; - networkId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ApplicationsPatchPreferEnum; - applications?: Applications; -} - -export interface ApplicationsPostRequest { - select?: string; - prefer?: ApplicationsPostPreferEnum; - applications?: Applications; -} - -/** - * - */ -export class ApplicationsApi extends runtime.BaseAPI { - - /** - * Onchain applications for processing relays through the network - */ - async applicationsDeleteRaw(requestParameters: ApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsDelete(requestParameters: ApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsGetRaw(requestParameters: ApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationsFromJSON)); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsGet(requestParameters: ApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.applicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPatchRaw(requestParameters: ApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['applicationAddress'] != null) { - queryParameters['application_address'] = requestParameters['applicationAddress']; - } - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['applicationPrivateKeyHex'] != null) { - queryParameters['application_private_key_hex'] = requestParameters['applicationPrivateKeyHex']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ApplicationsToJSON(requestParameters['applications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPatch(requestParameters: ApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPostRaw(requestParameters: ApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ApplicationsToJSON(requestParameters['applications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain applications for processing relays through the network - */ - async applicationsPost(requestParameters: ApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.applicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ApplicationsDeletePreferEnum = typeof ApplicationsDeletePreferEnum[keyof typeof ApplicationsDeletePreferEnum]; -/** - * @export - */ -export const ApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ApplicationsGetPreferEnum = typeof ApplicationsGetPreferEnum[keyof typeof ApplicationsGetPreferEnum]; -/** - * @export - */ -export const ApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ApplicationsPatchPreferEnum = typeof ApplicationsPatchPreferEnum[keyof typeof ApplicationsPatchPreferEnum]; -/** - * @export - */ -export const ApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ApplicationsPostPreferEnum = typeof ApplicationsPostPreferEnum[keyof typeof ApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts b/portal-db/sdk/typescript/src/apis/GatewaysApi.ts deleted file mode 100644 index bbfc5f024..000000000 --- a/portal-db/sdk/typescript/src/apis/GatewaysApi.ts +++ /dev/null @@ -1,367 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Gateways, -} from '../models/index'; -import { - GatewaysFromJSON, - GatewaysToJSON, -} from '../models/index'; - -export interface GatewaysDeleteRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - prefer?: GatewaysDeletePreferEnum; -} - -export interface GatewaysGetRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: GatewaysGetPreferEnum; -} - -export interface GatewaysPatchRequest { - gatewayAddress?: string; - stakeAmount?: string; - stakeDenom?: string; - networkId?: string; - gatewayPrivateKeyHex?: string; - createdAt?: string; - updatedAt?: string; - prefer?: GatewaysPatchPreferEnum; - gateways?: Gateways; -} - -export interface GatewaysPostRequest { - select?: string; - prefer?: GatewaysPostPreferEnum; - gateways?: Gateways; -} - -/** - * - */ -export class GatewaysApi extends runtime.BaseAPI { - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysDeleteRaw(requestParameters: GatewaysDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysDelete(requestParameters: GatewaysDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysDeleteRaw(requestParameters, initOverrides); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysGetRaw(requestParameters: GatewaysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GatewaysFromJSON)); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysGet(requestParameters: GatewaysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.gatewaysGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPatchRaw(requestParameters: GatewaysPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['gatewayAddress'] != null) { - queryParameters['gateway_address'] = requestParameters['gatewayAddress']; - } - - if (requestParameters['stakeAmount'] != null) { - queryParameters['stake_amount'] = requestParameters['stakeAmount']; - } - - if (requestParameters['stakeDenom'] != null) { - queryParameters['stake_denom'] = requestParameters['stakeDenom']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['gatewayPrivateKeyHex'] != null) { - queryParameters['gateway_private_key_hex'] = requestParameters['gatewayPrivateKeyHex']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: GatewaysToJSON(requestParameters['gateways']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPatch(requestParameters: GatewaysPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysPatchRaw(requestParameters, initOverrides); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPostRaw(requestParameters: GatewaysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/gateways`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GatewaysToJSON(requestParameters['gateways']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Onchain gateway information including stake and network details - */ - async gatewaysPost(requestParameters: GatewaysPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewaysPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const GatewaysDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type GatewaysDeletePreferEnum = typeof GatewaysDeletePreferEnum[keyof typeof GatewaysDeletePreferEnum]; -/** - * @export - */ -export const GatewaysGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type GatewaysGetPreferEnum = typeof GatewaysGetPreferEnum[keyof typeof GatewaysGetPreferEnum]; -/** - * @export - */ -export const GatewaysPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type GatewaysPatchPreferEnum = typeof GatewaysPatchPreferEnum[keyof typeof GatewaysPatchPreferEnum]; -/** - * @export - */ -export const GatewaysPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type GatewaysPostPreferEnum = typeof GatewaysPostPreferEnum[keyof typeof GatewaysPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts new file mode 100644 index 000000000..79587e887 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccountRbac, +} from '../models/index'; +import { + PortalAccountRbacFromJSON, + PortalAccountRbacToJSON, +} from '../models/index'; + +export interface PortalAccountRbacDeleteRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacDeletePreferEnum; +} + +export interface PortalAccountRbacGetRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountRbacGetPreferEnum; +} + +export interface PortalAccountRbacPatchRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacPatchPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +export interface PortalAccountRbacPostRequest { + select?: string; + prefer?: PortalAccountRbacPostPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +/** + * + */ +export class PortalAccountRbacApi extends runtime.BaseAPI { + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts new file mode 100644 index 000000000..05f0a6095 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplicationRbac, +} from '../models/index'; +import { + PortalApplicationRbacFromJSON, + PortalApplicationRbacToJSON, +} from '../models/index'; + +export interface PortalApplicationRbacDeleteRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacDeletePreferEnum; +} + +export interface PortalApplicationRbacGetRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationRbacGetPreferEnum; +} + +export interface PortalApplicationRbacPatchRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacPatchPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +export interface PortalApplicationRbacPostRequest { + select?: string; + prefer?: PortalApplicationRbacPostPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +/** + * + */ +export class PortalApplicationRbacApi extends runtime.BaseAPI { + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts new file mode 100644 index 000000000..86b57d8ce --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcArmorPostRequest, +} from '../models/index'; +import { + RpcArmorPostRequestFromJSON, + RpcArmorPostRequestToJSON, +} from '../models/index'; + +export interface RpcArmorGetRequest { + : string; +} + +export interface RpcArmorPostOperationRequest { + rpcArmorPostRequest: RpcArmorPostRequest; + prefer?: RpcArmorPostOperationPreferEnum; +} + +/** + * + */ +export class RpcArmorApi extends runtime.BaseAPI { + + /** + */ + async rpcArmorGetRaw(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcArmorGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/armor`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcArmorGet(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcArmorGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcArmorPostRaw(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcArmorPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcArmorPostRequest', + 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcArmorPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/armor`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcArmorPost(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcArmorPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcArmorPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcArmorPostOperationPreferEnum = typeof RpcArmorPostOperationPreferEnum[keyof typeof RpcArmorPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts b/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts deleted file mode 100644 index b4f1682ae..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcCreatePortalApplicationApi.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcCreatePortalApplicationPostRequest, -} from '../models/index'; -import { - RpcCreatePortalApplicationPostRequestFromJSON, - RpcCreatePortalApplicationPostRequestToJSON, -} from '../models/index'; - -export interface RpcCreatePortalApplicationGetRequest { - pPortalAccountId: string; - pPortalUserId: string; - pPortalApplicationName?: string; - pEmoji?: string; - pPortalApplicationUserLimit?: number; - pPortalApplicationUserLimitInterval?: string; - pPortalApplicationUserLimitRps?: number; - pPortalApplicationDescription?: string; - pFavoriteServiceIds?: string; - pSecretKeyRequired?: string; -} - -export interface RpcCreatePortalApplicationPostOperationRequest { - rpcCreatePortalApplicationPostRequest: RpcCreatePortalApplicationPostRequest; - prefer?: RpcCreatePortalApplicationPostOperationPreferEnum; -} - -/** - * - */ -export class RpcCreatePortalApplicationApi extends runtime.BaseAPI { - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationGetRaw(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['pPortalAccountId'] == null) { - throw new runtime.RequiredError( - 'pPortalAccountId', - 'Required parameter "pPortalAccountId" was null or undefined when calling rpcCreatePortalApplicationGet().' - ); - } - - if (requestParameters['pPortalUserId'] == null) { - throw new runtime.RequiredError( - 'pPortalUserId', - 'Required parameter "pPortalUserId" was null or undefined when calling rpcCreatePortalApplicationGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['pPortalAccountId'] != null) { - queryParameters['p_portal_account_id'] = requestParameters['pPortalAccountId']; - } - - if (requestParameters['pPortalUserId'] != null) { - queryParameters['p_portal_user_id'] = requestParameters['pPortalUserId']; - } - - if (requestParameters['pPortalApplicationName'] != null) { - queryParameters['p_portal_application_name'] = requestParameters['pPortalApplicationName']; - } - - if (requestParameters['pEmoji'] != null) { - queryParameters['p_emoji'] = requestParameters['pEmoji']; - } - - if (requestParameters['pPortalApplicationUserLimit'] != null) { - queryParameters['p_portal_application_user_limit'] = requestParameters['pPortalApplicationUserLimit']; - } - - if (requestParameters['pPortalApplicationUserLimitInterval'] != null) { - queryParameters['p_portal_application_user_limit_interval'] = requestParameters['pPortalApplicationUserLimitInterval']; - } - - if (requestParameters['pPortalApplicationUserLimitRps'] != null) { - queryParameters['p_portal_application_user_limit_rps'] = requestParameters['pPortalApplicationUserLimitRps']; - } - - if (requestParameters['pPortalApplicationDescription'] != null) { - queryParameters['p_portal_application_description'] = requestParameters['pPortalApplicationDescription']; - } - - if (requestParameters['pFavoriteServiceIds'] != null) { - queryParameters['p_favorite_service_ids'] = requestParameters['pFavoriteServiceIds']; - } - - if (requestParameters['pSecretKeyRequired'] != null) { - queryParameters['p_secret_key_required'] = requestParameters['pSecretKeyRequired']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/create_portal_application`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationGet(requestParameters: RpcCreatePortalApplicationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcCreatePortalApplicationGetRaw(requestParameters, initOverrides); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationPostRaw(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcCreatePortalApplicationPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcCreatePortalApplicationPostRequest', - 'Required parameter "rpcCreatePortalApplicationPostRequest" was null or undefined when calling rpcCreatePortalApplicationPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/create_portal_application`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcCreatePortalApplicationPostRequestToJSON(requestParameters['rpcCreatePortalApplicationPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Validates user membership in the account before creation. Returns the application details including the generated secret key. This function is exposed via PostgREST as POST /rpc/create_portal_application - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - */ - async rpcCreatePortalApplicationPost(requestParameters: RpcCreatePortalApplicationPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcCreatePortalApplicationPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcCreatePortalApplicationPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcCreatePortalApplicationPostOperationPreferEnum = typeof RpcCreatePortalApplicationPostOperationPreferEnum[keyof typeof RpcCreatePortalApplicationPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts new file mode 100644 index 000000000..22c7d3980 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcDearmorGetRequest { + : string; +} + +export interface RpcDearmorPostRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcDearmorPostPreferEnum; +} + +/** + * + */ +export class RpcDearmorApi extends runtime.BaseAPI { + + /** + */ + async rpcDearmorGetRaw(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcDearmorGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/dearmor`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcDearmorGet(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcDearmorGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcDearmorPostRaw(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcDearmorPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/dearmor`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcDearmorPost(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcDearmorPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcDearmorPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcDearmorPostPreferEnum = typeof RpcDearmorPostPreferEnum[keyof typeof RpcDearmorPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts similarity index 61% rename from portal-db/sdk/typescript/src/apis/RpcMeApi.ts rename to portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts index a8fdafb41..f134d68a8 100644 --- a/portal-db/sdk/typescript/src/apis/RpcMeApi.ts +++ b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts @@ -15,25 +15,25 @@ import * as runtime from '../runtime'; -export interface RpcMePostRequest { +export interface RpcGenRandomUuidPostRequest { body: object; - prefer?: RpcMePostPreferEnum; + prefer?: RpcGenRandomUuidPostPreferEnum; } /** * */ -export class RpcMeApi extends runtime.BaseAPI { +export class RpcGenRandomUuidApi extends runtime.BaseAPI { /** */ - async rpcMeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async rpcGenRandomUuidGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/rpc/me`; + let urlPath = `/rpc/gen_random_uuid`; const response = await this.request({ path: urlPath, @@ -47,17 +47,17 @@ export class RpcMeApi extends runtime.BaseAPI { /** */ - async rpcMeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcMeGetRaw(initOverrides); + async rpcGenRandomUuidGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenRandomUuidGetRaw(initOverrides); } /** */ - async rpcMePostRaw(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async rpcGenRandomUuidPostRaw(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['body'] == null) { throw new runtime.RequiredError( 'body', - 'Required parameter "body" was null or undefined when calling rpcMePost().' + 'Required parameter "body" was null or undefined when calling rpcGenRandomUuidPost().' ); } @@ -72,7 +72,7 @@ export class RpcMeApi extends runtime.BaseAPI { } - let urlPath = `/rpc/me`; + let urlPath = `/rpc/gen_random_uuid`; const response = await this.request({ path: urlPath, @@ -87,8 +87,8 @@ export class RpcMeApi extends runtime.BaseAPI { /** */ - async rpcMePost(requestParameters: RpcMePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcMePostRaw(requestParameters, initOverrides); + async rpcGenRandomUuidPost(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenRandomUuidPostRaw(requestParameters, initOverrides); } } @@ -96,7 +96,7 @@ export class RpcMeApi extends runtime.BaseAPI { /** * @export */ -export const RpcMePostPreferEnum = { +export const RpcGenRandomUuidPostPreferEnum = { ParamssingleObject: 'params=single-object' } as const; -export type RpcMePostPreferEnum = typeof RpcMePostPreferEnum[keyof typeof RpcMePostPreferEnum]; +export type RpcGenRandomUuidPostPreferEnum = typeof RpcGenRandomUuidPostPreferEnum[keyof typeof RpcGenRandomUuidPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts new file mode 100644 index 000000000..e8864684b --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcGenSaltGetRequest { + : string; +} + +export interface RpcGenSaltPostOperationRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcGenSaltPostOperationPreferEnum; +} + +/** + * + */ +export class RpcGenSaltApi extends runtime.BaseAPI { + + /** + */ + async rpcGenSaltGetRaw(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcGenSaltGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/gen_salt`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenSaltGet(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenSaltGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcGenSaltPostRaw(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcGenSaltPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/gen_salt`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenSaltPost(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenSaltPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcGenSaltPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcGenSaltPostOperationPreferEnum = typeof RpcGenSaltPostOperationPreferEnum[keyof typeof RpcGenSaltPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts new file mode 100644 index 000000000..7bf04ba44 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcPgpArmorHeadersGetRequest { + : string; +} + +export interface RpcPgpArmorHeadersPostRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcPgpArmorHeadersPostPreferEnum; +} + +/** + * + */ +export class RpcPgpArmorHeadersApi extends runtime.BaseAPI { + + /** + */ + async rpcPgpArmorHeadersGetRaw(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcPgpArmorHeadersGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/pgp_armor_headers`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpArmorHeadersGet(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpArmorHeadersGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcPgpArmorHeadersPostRaw(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcPgpArmorHeadersPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/pgp_armor_headers`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpArmorHeadersPost(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpArmorHeadersPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcPgpArmorHeadersPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcPgpArmorHeadersPostPreferEnum = typeof RpcPgpArmorHeadersPostPreferEnum[keyof typeof RpcPgpArmorHeadersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts new file mode 100644 index 000000000..1e93c1f94 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcArmorPostRequest, +} from '../models/index'; +import { + RpcArmorPostRequestFromJSON, + RpcArmorPostRequestToJSON, +} from '../models/index'; + +export interface RpcPgpKeyIdGetRequest { + : string; +} + +export interface RpcPgpKeyIdPostRequest { + rpcArmorPostRequest: RpcArmorPostRequest; + prefer?: RpcPgpKeyIdPostPreferEnum; +} + +/** + * + */ +export class RpcPgpKeyIdApi extends runtime.BaseAPI { + + /** + */ + async rpcPgpKeyIdGetRaw(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcPgpKeyIdGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/pgp_key_id`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpKeyIdGet(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpKeyIdGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcPgpKeyIdPostRaw(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcArmorPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcArmorPostRequest', + 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcPgpKeyIdPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/pgp_key_id`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpKeyIdPost(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpKeyIdPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcPgpKeyIdPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcPgpKeyIdPostPreferEnum = typeof RpcPgpKeyIdPostPreferEnum[keyof typeof RpcPgpKeyIdPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts index 953eda314..36471e815 100644 --- a/portal-db/sdk/typescript/src/apis/ServicesApi.ts +++ b/portal-db/sdk/typescript/src/apis/ServicesApi.ts @@ -35,6 +35,9 @@ export interface ServicesDeleteRequest { qualityFallbackEnabled?: boolean; hardFallbackEnabled?: boolean; svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; deletedAt?: string; createdAt?: string; updatedAt?: string; @@ -54,6 +57,9 @@ export interface ServicesGetRequest { qualityFallbackEnabled?: boolean; hardFallbackEnabled?: boolean; svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; deletedAt?: string; createdAt?: string; updatedAt?: string; @@ -79,6 +85,9 @@ export interface ServicesPatchRequest { qualityFallbackEnabled?: boolean; hardFallbackEnabled?: boolean; svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; deletedAt?: string; createdAt?: string; updatedAt?: string; @@ -151,6 +160,18 @@ export class ServicesApi extends runtime.BaseAPI { queryParameters['svg_icon'] = requestParameters['svgIcon']; } + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + if (requestParameters['deletedAt'] != null) { queryParameters['deleted_at'] = requestParameters['deletedAt']; } @@ -243,6 +264,18 @@ export class ServicesApi extends runtime.BaseAPI { queryParameters['svg_icon'] = requestParameters['svgIcon']; } + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + if (requestParameters['deletedAt'] != null) { queryParameters['deleted_at'] = requestParameters['deletedAt']; } @@ -367,6 +400,18 @@ export class ServicesApi extends runtime.BaseAPI { queryParameters['svg_icon'] = requestParameters['svgIcon']; } + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + if (requestParameters['deletedAt'] != null) { queryParameters['deleted_at'] = requestParameters['deletedAt']; } diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts index 3e7698705..9d9f59f95 100644 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -1,15 +1,19 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ApplicationsApi'; -export * from './GatewaysApi'; export * from './IntrospectionApi'; export * from './NetworksApi'; export * from './OrganizationsApi'; +export * from './PortalAccountRbacApi'; export * from './PortalAccountsApi'; +export * from './PortalApplicationRbacApi'; export * from './PortalApplicationsApi'; export * from './PortalPlansApi'; -export * from './RpcCreatePortalApplicationApi'; -export * from './RpcMeApi'; +export * from './RpcArmorApi'; +export * from './RpcDearmorApi'; +export * from './RpcGenRandomUuidApi'; +export * from './RpcGenSaltApi'; +export * from './RpcPgpArmorHeadersApi'; +export * from './RpcPgpKeyIdApi'; export * from './ServiceEndpointsApi'; export * from './ServiceFallbacksApi'; export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/models/Applications.ts b/portal-db/sdk/typescript/src/models/Applications.ts deleted file mode 100644 index 036376484..000000000 --- a/portal-db/sdk/typescript/src/models/Applications.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Onchain applications for processing relays through the network - * @export - * @interface Applications - */ -export interface Applications { - /** - * Blockchain address of the application - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Applications - */ - applicationAddress: string; - /** - * Note: - * This is a Foreign Key to `gateways.gateway_address`. - * @type {string} - * @memberof Applications - */ - gatewayAddress: string; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof Applications - */ - serviceId: string; - /** - * - * @type {number} - * @memberof Applications - */ - stakeAmount?: number; - /** - * - * @type {string} - * @memberof Applications - */ - stakeDenom?: string; - /** - * - * @type {string} - * @memberof Applications - */ - applicationPrivateKeyHex?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Applications - */ - networkId: string; - /** - * - * @type {string} - * @memberof Applications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Applications - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Applications interface. - */ -export function instanceOfApplications(value: object): value is Applications { - if (!('applicationAddress' in value) || value['applicationAddress'] === undefined) return false; - if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function ApplicationsFromJSON(json: any): Applications { - return ApplicationsFromJSONTyped(json, false); -} - -export function ApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Applications { - if (json == null) { - return json; - } - return { - - 'applicationAddress': json['application_address'], - 'gatewayAddress': json['gateway_address'], - 'serviceId': json['service_id'], - 'stakeAmount': json['stake_amount'] == null ? undefined : json['stake_amount'], - 'stakeDenom': json['stake_denom'] == null ? undefined : json['stake_denom'], - 'applicationPrivateKeyHex': json['application_private_key_hex'] == null ? undefined : json['application_private_key_hex'], - 'networkId': json['network_id'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ApplicationsToJSON(json: any): Applications { - return ApplicationsToJSONTyped(json, false); -} - -export function ApplicationsToJSONTyped(value?: Applications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'application_address': value['applicationAddress'], - 'gateway_address': value['gatewayAddress'], - 'service_id': value['serviceId'], - 'stake_amount': value['stakeAmount'], - 'stake_denom': value['stakeDenom'], - 'application_private_key_hex': value['applicationPrivateKeyHex'], - 'network_id': value['networkId'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Gateways.ts b/portal-db/sdk/typescript/src/models/Gateways.ts deleted file mode 100644 index 7c713aed1..000000000 --- a/portal-db/sdk/typescript/src/models/Gateways.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Onchain gateway information including stake and network details - * @export - * @interface Gateways - */ -export interface Gateways { - /** - * Blockchain address of the gateway - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Gateways - */ - gatewayAddress: string; - /** - * Amount of tokens staked by the gateway - * @type {number} - * @memberof Gateways - */ - stakeAmount: number; - /** - * - * @type {string} - * @memberof Gateways - */ - stakeDenom: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Gateways - */ - networkId: string; - /** - * - * @type {string} - * @memberof Gateways - */ - gatewayPrivateKeyHex?: string; - /** - * - * @type {string} - * @memberof Gateways - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Gateways - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Gateways interface. - */ -export function instanceOfGateways(value: object): value is Gateways { - if (!('gatewayAddress' in value) || value['gatewayAddress'] === undefined) return false; - if (!('stakeAmount' in value) || value['stakeAmount'] === undefined) return false; - if (!('stakeDenom' in value) || value['stakeDenom'] === undefined) return false; - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function GatewaysFromJSON(json: any): Gateways { - return GatewaysFromJSONTyped(json, false); -} - -export function GatewaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gateways { - if (json == null) { - return json; - } - return { - - 'gatewayAddress': json['gateway_address'], - 'stakeAmount': json['stake_amount'], - 'stakeDenom': json['stake_denom'], - 'networkId': json['network_id'], - 'gatewayPrivateKeyHex': json['gateway_private_key_hex'] == null ? undefined : json['gateway_private_key_hex'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function GatewaysToJSON(json: any): Gateways { - return GatewaysToJSONTyped(json, false); -} - -export function GatewaysToJSONTyped(value?: Gateways | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'gateway_address': value['gatewayAddress'], - 'stake_amount': value['stakeAmount'], - 'stake_denom': value['stakeDenom'], - 'network_id': value['networkId'], - 'gateway_private_key_hex': value['gatewayPrivateKeyHex'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts new file mode 100644 index 000000000..b605719a0 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User roles and permissions for specific portal accounts + * @export + * @interface PortalAccountRbac + */ +export interface PortalAccountRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalAccountRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalAccountRbac + */ + roleName: string; + /** + * + * @type {boolean} + * @memberof PortalAccountRbac + */ + userJoinedAccount?: boolean; +} + +/** + * Check if a given object implements the PortalAccountRbac interface. + */ +export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + if (!('roleName' in value) || value['roleName'] === undefined) return false; + return true; +} + +export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { + return PortalAccountRbacFromJSONTyped(json, false); +} + +export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalAccountId': json['portal_account_id'], + 'portalUserId': json['portal_user_id'], + 'roleName': json['role_name'], + 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], + }; +} + +export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { + return PortalAccountRbacToJSONTyped(json, false); +} + +export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_account_id': value['portalAccountId'], + 'portal_user_id': value['portalUserId'], + 'role_name': value['roleName'], + 'user_joined_account': value['userJoinedAccount'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts new file mode 100644 index 000000000..5216b4f8a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User access controls for specific applications + * @export + * @interface PortalApplicationRbac + */ +export interface PortalApplicationRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalApplicationRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_applications.portal_application_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the PortalApplicationRbac interface. + */ +export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + return true; +} + +export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacFromJSONTyped(json, false); +} + +export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalApplicationId': json['portal_application_id'], + 'portalUserId': json['portal_user_id'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacToJSONTyped(json, false); +} + +export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_application_id': value['portalApplicationId'], + 'portal_user_id': value['portalUserId'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts new file mode 100644 index 000000000..8ad6bc8bf --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RpcArmorPostRequest + */ +export interface RpcArmorPostRequest { + /** + * + * @type {string} + * @memberof RpcArmorPostRequest + */ + : string; +} + +/** + * Check if a given object implements the RpcArmorPostRequest interface. + */ +export function instanceOfRpcArmorPostRequest(value: object): value is RpcArmorPostRequest { + if (!('' in value) || value[''] === undefined) return false; + return true; +} + +export function RpcArmorPostRequestFromJSON(json: any): RpcArmorPostRequest { + return RpcArmorPostRequestFromJSONTyped(json, false); +} + +export function RpcArmorPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcArmorPostRequest { + if (json == null) { + return json; + } + return { + + '': json[''], + }; +} + +export function RpcArmorPostRequestToJSON(json: any): RpcArmorPostRequest { + return RpcArmorPostRequestToJSONTyped(json, false); +} + +export function RpcArmorPostRequestToJSONTyped(value?: RpcArmorPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + '': value[''], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts deleted file mode 100644 index df5aa2c30..000000000 --- a/portal-db/sdk/typescript/src/models/RpcCreatePortalApplicationPostRequest.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Creates a portal application with all associated RBAC entries in a single atomic transaction. - * Validates user membership in the account before creation. - * Returns the application details including the generated secret key. - * This function is exposed via PostgREST as POST /rpc/create_portal_application - * @export - * @interface RpcCreatePortalApplicationPostRequest - */ -export interface RpcCreatePortalApplicationPostRequest { - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pEmoji?: string; - /** - * - * @type {Array} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pFavoriteServiceIds?: Array; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalAccountId: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationDescription?: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationName?: string; - /** - * - * @type {number} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimitInterval?: string; - /** - * - * @type {number} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pPortalUserId: string; - /** - * - * @type {string} - * @memberof RpcCreatePortalApplicationPostRequest - */ - pSecretKeyRequired?: string; -} - -/** - * Check if a given object implements the RpcCreatePortalApplicationPostRequest interface. - */ -export function instanceOfRpcCreatePortalApplicationPostRequest(value: object): value is RpcCreatePortalApplicationPostRequest { - if (!('pPortalAccountId' in value) || value['pPortalAccountId'] === undefined) return false; - if (!('pPortalUserId' in value) || value['pPortalUserId'] === undefined) return false; - return true; -} - -export function RpcCreatePortalApplicationPostRequestFromJSON(json: any): RpcCreatePortalApplicationPostRequest { - return RpcCreatePortalApplicationPostRequestFromJSONTyped(json, false); -} - -export function RpcCreatePortalApplicationPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcCreatePortalApplicationPostRequest { - if (json == null) { - return json; - } - return { - - 'pEmoji': json['p_emoji'] == null ? undefined : json['p_emoji'], - 'pFavoriteServiceIds': json['p_favorite_service_ids'] == null ? undefined : json['p_favorite_service_ids'], - 'pPortalAccountId': json['p_portal_account_id'], - 'pPortalApplicationDescription': json['p_portal_application_description'] == null ? undefined : json['p_portal_application_description'], - 'pPortalApplicationName': json['p_portal_application_name'] == null ? undefined : json['p_portal_application_name'], - 'pPortalApplicationUserLimit': json['p_portal_application_user_limit'] == null ? undefined : json['p_portal_application_user_limit'], - 'pPortalApplicationUserLimitInterval': json['p_portal_application_user_limit_interval'] == null ? undefined : json['p_portal_application_user_limit_interval'], - 'pPortalApplicationUserLimitRps': json['p_portal_application_user_limit_rps'] == null ? undefined : json['p_portal_application_user_limit_rps'], - 'pPortalUserId': json['p_portal_user_id'], - 'pSecretKeyRequired': json['p_secret_key_required'] == null ? undefined : json['p_secret_key_required'], - }; -} - -export function RpcCreatePortalApplicationPostRequestToJSON(json: any): RpcCreatePortalApplicationPostRequest { - return RpcCreatePortalApplicationPostRequestToJSONTyped(json, false); -} - -export function RpcCreatePortalApplicationPostRequestToJSONTyped(value?: RpcCreatePortalApplicationPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'p_emoji': value['pEmoji'], - 'p_favorite_service_ids': value['pFavoriteServiceIds'], - 'p_portal_account_id': value['pPortalAccountId'], - 'p_portal_application_description': value['pPortalApplicationDescription'], - 'p_portal_application_name': value['pPortalApplicationName'], - 'p_portal_application_user_limit': value['pPortalApplicationUserLimit'], - 'p_portal_application_user_limit_interval': value['pPortalApplicationUserLimitInterval'], - 'p_portal_application_user_limit_rps': value['pPortalApplicationUserLimitRps'], - 'p_portal_user_id': value['pPortalUserId'], - 'p_secret_key_required': value['pSecretKeyRequired'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts new file mode 100644 index 000000000..d09a9f460 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RpcGenSaltPostRequest + */ +export interface RpcGenSaltPostRequest { + /** + * + * @type {string} + * @memberof RpcGenSaltPostRequest + */ + : string; +} + +/** + * Check if a given object implements the RpcGenSaltPostRequest interface. + */ +export function instanceOfRpcGenSaltPostRequest(value: object): value is RpcGenSaltPostRequest { + if (!('' in value) || value[''] === undefined) return false; + return true; +} + +export function RpcGenSaltPostRequestFromJSON(json: any): RpcGenSaltPostRequest { + return RpcGenSaltPostRequestFromJSONTyped(json, false); +} + +export function RpcGenSaltPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcGenSaltPostRequest { + if (json == null) { + return json; + } + return { + + '': json[''], + }; +} + +export function RpcGenSaltPostRequestToJSON(json: any): RpcGenSaltPostRequest { + return RpcGenSaltPostRequestToJSONTyped(json, false); +} + +export function RpcGenSaltPostRequestToJSONTyped(value?: RpcGenSaltPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + '': value[''], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts index c9341fcdb..766a36099 100644 --- a/portal-db/sdk/typescript/src/models/Services.ts +++ b/portal-db/sdk/typescript/src/models/Services.ts @@ -93,6 +93,24 @@ export interface Services { * @memberof Services */ svgIcon?: string; + /** + * + * @type {string} + * @memberof Services + */ + publicEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusQuery?: string; /** * * @type {string} @@ -145,6 +163,9 @@ export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], + 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], + 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], + 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], 'createdAt': json['created_at'] == null ? undefined : json['created_at'], 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], @@ -174,6 +195,9 @@ export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator 'quality_fallback_enabled': value['qualityFallbackEnabled'], 'hard_fallback_enabled': value['hardFallbackEnabled'], 'svg_icon': value['svgIcon'], + 'public_endpoint_url': value['publicEndpointUrl'], + 'status_endpoint_url': value['statusEndpointUrl'], + 'status_query': value['statusQuery'], 'deleted_at': value['deletedAt'], 'created_at': value['createdAt'], 'updated_at': value['updatedAt'], diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts index eda1454eb..316dd6fee 100644 --- a/portal-db/sdk/typescript/src/models/index.ts +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -1,13 +1,14 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Applications'; -export * from './Gateways'; export * from './Networks'; export * from './Organizations'; +export * from './PortalAccountRbac'; export * from './PortalAccounts'; +export * from './PortalApplicationRbac'; export * from './PortalApplications'; export * from './PortalPlans'; -export * from './RpcCreatePortalApplicationPostRequest'; +export * from './RpcArmorPostRequest'; +export * from './RpcGenSaltPostRequest'; export * from './ServiceEndpoints'; export * from './ServiceFallbacks'; export * from './Services'; From af56c90608bdaa1d7edda196328a8b60b91f835c Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 7 Oct 2025 14:41:24 +0100 Subject: [PATCH 30/43] feat: add authenticator password script --- ...or_password.sql => set_authenticator_password.sql} | 0 portal-db/docker-compose.yml | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) rename portal-db/api/scripts/{003_set_authenticator_password.sql => set_authenticator_password.sql} (100%) diff --git a/portal-db/api/scripts/003_set_authenticator_password.sql b/portal-db/api/scripts/set_authenticator_password.sql similarity index 100% rename from portal-db/api/scripts/003_set_authenticator_password.sql rename to portal-db/api/scripts/set_authenticator_password.sql diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index cc8b35acf..97235b11f 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -41,14 +41,19 @@ services: volumes: # PostgreSQL data persistence (survives container restarts) - ./tmp/portal_db_data:/var/lib/postgresql/data - # Initialization scripts (run in alphabetical order on first startup) + + # 1. Initialization scripts (run in alphabetical order on first startup) # Documentation: https://hub.docker.com/_/postgres#initialization-scripts # 001_portal_init.sql: Initial PostgreSQL schema - ./schema/001_portal_init.sql:/docker-entrypoint-initdb.d/001_portal_init.sql:ro # 002_postgrest_init.sql: PostgREST API setup (roles, permissions, JWT) - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro - # 003_set_authenticator_password.sql: Set authenticator password (LOCAL DEV ONLY) - - ./api/scripts/003_set_authenticator_password.sql:/docker-entrypoint-initdb.d/003_set_authenticator_password.sql:ro + + # 2. LOCAL DEV ONLY: mount set_authenticator_password.sql: Set authenticator password + # - Required to set the authenticator role's password to 'authenticator_password' for the local development environment. + # - In production environments, the password will be set by an admin outside of SQL migration files. + - ./api/scripts/set_authenticator_password.sql:/docker-entrypoint-initdb.d/999_set_authenticator_password.sql:ro + healthcheck: # Health check to ensure database is ready before starting PostgREST test: ["CMD", "pg_isready", "-U", "postgres", "-d", "portal_db"] From 9d50b3ceacaec2171571b9562d01bccf3059d803 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 7 Oct 2025 14:45:32 +0100 Subject: [PATCH 31/43] remove TS SDK --- portal-db/api/codegen/generate-sdks.sh | 185 +----- portal-db/sdk/typescript/.gitignore | 4 - portal-db/sdk/typescript/.npmignore | 1 - .../sdk/typescript/.openapi-generator-ignore | 26 - .../sdk/typescript/.openapi-generator/FILES | 37 -- .../sdk/typescript/.openapi-generator/VERSION | 1 - portal-db/sdk/typescript/README.md | 96 ---- portal-db/sdk/typescript/package.json | 19 - .../typescript/src/apis/IntrospectionApi.ts | 51 -- .../sdk/typescript/src/apis/NetworksApi.ts | 277 --------- .../typescript/src/apis/OrganizationsApi.ts | 337 ----------- .../src/apis/PortalAccountRbacApi.ts | 337 ----------- .../typescript/src/apis/PortalAccountsApi.ts | 487 ---------------- .../src/apis/PortalApplicationRbacApi.ts | 337 ----------- .../src/apis/PortalApplicationsApi.ts | 472 ---------------- .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 ------------ .../sdk/typescript/src/apis/RpcArmorApi.ts | 124 ---- .../sdk/typescript/src/apis/RpcDearmorApi.ts | 124 ---- .../src/apis/RpcGenRandomUuidApi.ts | 102 ---- .../sdk/typescript/src/apis/RpcGenSaltApi.ts | 124 ---- .../src/apis/RpcPgpArmorHeadersApi.ts | 124 ---- .../sdk/typescript/src/apis/RpcPgpKeyIdApi.ts | 124 ---- .../src/apis/ServiceEndpointsApi.ts | 337 ----------- .../src/apis/ServiceFallbacksApi.ts | 337 ----------- .../sdk/typescript/src/apis/ServicesApi.ts | 532 ------------------ portal-db/sdk/typescript/src/apis/index.ts | 19 - portal-db/sdk/typescript/src/index.ts | 5 - .../sdk/typescript/src/models/Networks.ts | 67 --- .../typescript/src/models/Organizations.ts | 100 ---- .../src/models/PortalAccountRbac.ts | 104 ---- .../typescript/src/models/PortalAccounts.ts | 196 ------- .../src/models/PortalApplicationRbac.ts | 103 ---- .../src/models/PortalApplications.ts | 185 ------ .../sdk/typescript/src/models/PortalPlans.ts | 119 ---- .../src/models/RpcArmorPostRequest.ts | 66 --- .../src/models/RpcGenSaltPostRequest.ts | 66 --- .../typescript/src/models/ServiceEndpoints.ts | 116 ---- .../typescript/src/models/ServiceFallbacks.ts | 102 ---- .../sdk/typescript/src/models/Services.ts | 206 ------- portal-db/sdk/typescript/src/models/index.ts | 14 - portal-db/sdk/typescript/src/runtime.ts | 432 -------------- portal-db/sdk/typescript/tsconfig.json | 20 - 42 files changed, 4 insertions(+), 6863 deletions(-) delete mode 100644 portal-db/sdk/typescript/.gitignore delete mode 100644 portal-db/sdk/typescript/.npmignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES delete mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION delete mode 100644 portal-db/sdk/typescript/README.md delete mode 100644 portal-db/sdk/typescript/package.json delete mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcArmorApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/index.ts delete mode 100644 portal-db/sdk/typescript/src/index.ts delete mode 100644 portal-db/sdk/typescript/src/models/Networks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Services.ts delete mode 100644 portal-db/sdk/typescript/src/models/index.ts delete mode 100644 portal-db/sdk/typescript/src/runtime.ts delete mode 100644 portal-db/sdk/typescript/tsconfig.json diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 13ffec66b..a7a4ad9da 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -1,9 +1,8 @@ #!/bin/bash -# Generate Go and TypeScript SDKs from OpenAPI specification -# This script generates both Go and TypeScript SDKs for the Portal DB API +# Generate Go SDK from OpenAPI specification +# This script generates a Go SDK for the Portal DB API # - Go SDK: Uses oapi-codegen for client and models generation -# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation set -e @@ -12,7 +11,6 @@ OPENAPI_DIR="../openapi" OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" GO_OUTPUT_DIR="../../sdk/go" -TS_OUTPUT_DIR="../../sdk/typescript" CONFIG_MODELS="./codegen-models.yaml" CONFIG_CLIENT="./codegen-client.yaml" POSTGREST_URL="http://localhost:3000" @@ -24,7 +22,7 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." +echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification..." # ============================================================================ # PHASE 1: ENVIRONMENT VALIDATION @@ -57,55 +55,6 @@ fi echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" -# Check if Node.js and npm are installed for TypeScript SDK generation -if ! command -v node >/dev/null 2>&1; then - echo -e "${RED}โŒ Node.js is not installed. Please install Node.js first.${NC}" - echo " - Mac: brew install node" - echo " - Or download from: https://nodejs.org/" - exit 1 -fi - -echo -e "${GREEN}โœ… Node.js is installed: $(node --version)${NC}" - -if ! command -v npm >/dev/null 2>&1; then - echo -e "${RED}โŒ npm is not installed. Please install npm first.${NC}" - exit 1 -fi - -echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" - -# Check if Java is installed -if ! command -v java >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" - echo " Install Java: brew install openjdk" - exit 1 -fi - -# Verify Java is working properly -if ! java -version >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" - echo " Fix Java installation: brew install openjdk" - echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" - exit 1 -fi - -JAVA_VERSION=$(java -version 2>&1 | head -n1) -echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" - -# Check if openapi-generator-cli is installed -if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing openapi-generator-cli..." - npm install -g @openapitools/openapi-generator-cli - - # Verify installation - if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" - exit 1 - fi -fi - -echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" - # Check if PostgREST is running echo "๐ŸŒ Checking PostgREST availability..." if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then @@ -231,31 +180,6 @@ fi echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" -echo "" -echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." - -# Create TypeScript output directory if it doesn't exist -mkdir -p "$TS_OUTPUT_DIR" - -# Clean previous generated TypeScript files (keep permanent files) -echo "๐Ÿงน Cleaning previous TypeScript generated files..." -rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" - -# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) -echo " Generating TypeScript client with built-in methods..." -if ! openapi-generator-cli generate \ - -i "$OPENAPI_V3_FILE" \ - -g typescript-fetch \ - -o "$TS_OUTPUT_DIR" \ - --skip-validate-spec \ - --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then - echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" - exit 1 -fi - - -echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" - # ============================================================================ # PHASE 4: MODULE SETUP # ============================================================================ @@ -289,86 +213,6 @@ echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" # Return to scripts directory cd - >/dev/null -# TypeScript module setup -echo "" -echo "๐Ÿ”ท Setting up TypeScript module..." - -# Navigate to TypeScript SDK directory -cd "$TS_OUTPUT_DIR" - -# Create package.json if it doesn't exist -if [ ! -f "package.json" ]; then - echo "๐Ÿ“ฆ Creating package.json..." - cat > package.json << 'EOF' -{ - "name": "@grove/portal-db-sdk", - "version": "1.0.0", - "description": "TypeScript SDK for Grove Portal DB API", - "main": "index.ts", - "types": "types.d.ts", - "scripts": { - "build": "tsc", - "type-check": "tsc --noEmit" - }, - "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], - "author": "Grove Team", - "license": "MIT", - "devDependencies": { - "typescript": "^5.0.0" - }, - "peerDependencies": { - "typescript": ">=4.5.0" - } -} -EOF -fi - -# Create tsconfig.json if it doesn't exist -if [ ! -f "tsconfig.json" ]; then - echo "๐Ÿ”ง Creating tsconfig.json..." - cat > tsconfig.json << 'EOF' -{ - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "lib": ["ES2020", "DOM"], - "moduleResolution": "Bundler", - "noUncheckedIndexedAccess": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "declarationMap": true, - "outDir": "./dist" - }, - "include": ["src/**/*", "models/**/*", "apis/**/*"], - "exclude": ["node_modules", "dist"] -} -EOF -fi - -echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" - -# Test TypeScript compilation if TypeScript is available -if command -v tsc >/dev/null 2>&1; then - echo "๐Ÿ” Validating TypeScript compilation..." - if ! npx tsc --noEmit; then - echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" - echo " This may be due to missing dependencies or configuration issues" - echo " The generated types.ts file should still be usable" - else - echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" - fi -else - echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" - echo " Install TypeScript globally: npm install -g typescript" -fi - -# Return to scripts directory -cd - >/dev/null - # ============================================================================ # SUCCESS SUMMARY # ============================================================================ @@ -379,7 +223,6 @@ echo "" echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" echo " API Docs: $OPENAPI_V3_FILE" echo " Go SDK: $GO_OUTPUT_DIR" -echo " TypeScript: $TS_OUTPUT_DIR" echo "" echo -e "${BLUE}๐Ÿน Go SDK:${NC}" echo " Module: github.com/buildwithgrove/path/portal-db/sdk/go" @@ -390,16 +233,6 @@ echo " โ€ข client.go - Generated SDK client and methods (updated)" echo " โ€ข go.mod - Go module definition (permanent)" echo " โ€ข README.md - Documentation (permanent)" echo "" -echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" -echo " Package: @grove/portal-db-sdk" -echo " Runtime: Zero dependencies (uses native fetch)" -echo " Files:" -echo " โ€ข apis/ - Generated API client classes (updated)" -echo " โ€ข models/ - Generated TypeScript models (updated)" -echo " โ€ข package.json - Node.js package definition (permanent)" -echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" -echo " โ€ข README.md - Documentation (permanent)" -echo "" echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" echo "" @@ -411,19 +244,9 @@ echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" echo " 3. Import in your project: go get github.com/buildwithgrove/path/portal-db/sdk/go" echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" echo "" -echo -e "${BLUE}TypeScript SDK:${NC}" -echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" -echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" -echo " 3. Copy to your React project or publish as npm package" -echo " 4. Import client: import { DefaultApi } from './apis'" -echo " 5. Use built-in methods: await client.portalApplicationsGet()" -echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" -echo "" echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" echo " โ€ข Go: Full client with methods, types separated for readability" -echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" -echo " โ€ข Both SDKs update automatically when you run this script" +echo " โ€ข SDK updates automatically when you run this script" echo " โ€ข Run after database schema changes to stay in sync" -echo " โ€ข TypeScript SDK has zero runtime dependencies" echo "" echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore deleted file mode 100644 index 149b57654..000000000 --- a/portal-db/sdk/typescript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore deleted file mode 100644 index 42061c01a..000000000 --- a/portal-db/sdk/typescript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore deleted file mode 100644 index 884649821..000000000 --- a/portal-db/sdk/typescript/.openapi-generator-ignore +++ /dev/null @@ -1,26 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -# Ignore README.md to preserve custom documentation -README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES deleted file mode 100644 index 62c8d8dfa..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ /dev/null @@ -1,37 +0,0 @@ -.gitignore -.npmignore -package.json -src/apis/IntrospectionApi.ts -src/apis/NetworksApi.ts -src/apis/OrganizationsApi.ts -src/apis/PortalAccountRbacApi.ts -src/apis/PortalAccountsApi.ts -src/apis/PortalApplicationRbacApi.ts -src/apis/PortalApplicationsApi.ts -src/apis/PortalPlansApi.ts -src/apis/RpcArmorApi.ts -src/apis/RpcDearmorApi.ts -src/apis/RpcGenRandomUuidApi.ts -src/apis/RpcGenSaltApi.ts -src/apis/RpcPgpArmorHeadersApi.ts -src/apis/RpcPgpKeyIdApi.ts -src/apis/ServiceEndpointsApi.ts -src/apis/ServiceFallbacksApi.ts -src/apis/ServicesApi.ts -src/apis/index.ts -src/index.ts -src/models/Networks.ts -src/models/Organizations.ts -src/models/PortalAccountRbac.ts -src/models/PortalAccounts.ts -src/models/PortalApplicationRbac.ts -src/models/PortalApplications.ts -src/models/PortalPlans.ts -src/models/RpcArmorPostRequest.ts -src/models/RpcGenSaltPostRequest.ts -src/models/ServiceEndpoints.ts -src/models/ServiceFallbacks.ts -src/models/Services.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION deleted file mode 100644 index e465da431..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md deleted file mode 100644 index b95617b40..000000000 --- a/portal-db/sdk/typescript/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# TypeScript SDK for Portal DB - -Auto-generated TypeScript client for the Portal Database API. - -## Installation - -```bash -npm install @grove/portal-db-sdk -``` - -> **TODO**: Publish this package to npm registry - -## Quick Start - -Built-in client methods (auto-generated): - -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; - -// Create client -const config = new Configuration({ - basePath: "http://localhost:3000" -}); -const client = new PortalApplicationsApi(config); - -// Use built-in methods - no manual paths needed! -const applications = await client.portalApplicationsGet(); -``` - -React integration: - -```typescript -import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; -import { useState, useEffect } from "react"; - -const config = new Configuration({ basePath: "http://localhost:3000" }); -const portalAppsClient = new PortalApplicationsApi(config); -const createAppClient = new RpcCreatePortalApplicationApi(config); - -function PortalApplicationsList() { - const [applications, setApplications] = useState([]); - const [loading, setLoading] = useState(true); - - useEffect(() => { - portalAppsClient.portalApplicationsGet().then((apps) => { - setApplications(apps); - setLoading(false); - }); - }, []); - - const createApp = async () => { - await createAppClient.rpcCreatePortalApplicationPost({ - rpcCreatePortalApplicationPostRequest: { - pPortalAccountId: "account-123", - pPortalUserId: "user-456", - pPortalApplicationName: "My App", - pEmoji: "๐Ÿš€" - } - }); - // Refresh list - const apps = await portalAppsClient.portalApplicationsGet(); - setApplications(apps); - }; - - if (loading) return "Loading..."; - - return ( -
- -
    - {applications.map(app => ( -
  • - {app.emoji} {app.portalApplicationName} -
  • - ))} -
-
- ); -} -``` - -## Authentication - -Add JWT tokens to your requests: - -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; - -// With JWT auth -const config = new Configuration({ - basePath: "http://localhost:3000", - accessToken: jwtToken -}); - -const client = new PortalApplicationsApi(config); -``` diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json deleted file mode 100644 index 2cbb1e8a2..000000000 --- a/portal-db/sdk/typescript/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@grove/portal-db-sdk", - "version": "12.0.2 (a4e00ff)", - "description": "OpenAPI client for @grove/portal-db-sdk", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^4.0 || ^5.0" - } -} diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts deleted file mode 100644 index b654b5e25..000000000 --- a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -/** - * - */ -export class IntrospectionApi extends runtime.BaseAPI { - - /** - * OpenAPI description (this document) - */ - async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * OpenAPI description (this document) - */ - async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rootGetRaw(initOverrides); - } - -} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts deleted file mode 100644 index 7ed2eea64..000000000 --- a/portal-db/sdk/typescript/src/apis/NetworksApi.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Networks, -} from '../models/index'; -import { - NetworksFromJSON, - NetworksToJSON, -} from '../models/index'; - -export interface NetworksDeleteRequest { - networkId?: string; - prefer?: NetworksDeletePreferEnum; -} - -export interface NetworksGetRequest { - networkId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: NetworksGetPreferEnum; -} - -export interface NetworksPatchRequest { - networkId?: string; - prefer?: NetworksPatchPreferEnum; - networks?: Networks; -} - -export interface NetworksPostRequest { - select?: string; - prefer?: NetworksPostPreferEnum; - networks?: Networks; -} - -/** - * - */ -export class NetworksApi extends runtime.BaseAPI { - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.networksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const NetworksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; -/** - * @export - */ -export const NetworksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; -/** - * @export - */ -export const NetworksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; -/** - * @export - */ -export const NetworksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts deleted file mode 100644 index 9944fa2cd..000000000 --- a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Organizations, -} from '../models/index'; -import { - OrganizationsFromJSON, - OrganizationsToJSON, -} from '../models/index'; - -export interface OrganizationsDeleteRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsDeletePreferEnum; -} - -export interface OrganizationsGetRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: OrganizationsGetPreferEnum; -} - -export interface OrganizationsPatchRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsPatchPreferEnum; - organizations?: Organizations; -} - -export interface OrganizationsPostRequest { - select?: string; - prefer?: OrganizationsPostPreferEnum; - organizations?: Organizations; -} - -/** - * - */ -export class OrganizationsApi extends runtime.BaseAPI { - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.organizationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const OrganizationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; -/** - * @export - */ -export const OrganizationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; -/** - * @export - */ -export const OrganizationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; -/** - * @export - */ -export const OrganizationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts deleted file mode 100644 index 79587e887..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccountRbac, -} from '../models/index'; -import { - PortalAccountRbacFromJSON, - PortalAccountRbacToJSON, -} from '../models/index'; - -export interface PortalAccountRbacDeleteRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacDeletePreferEnum; -} - -export interface PortalAccountRbacGetRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountRbacGetPreferEnum; -} - -export interface PortalAccountRbacPatchRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacPatchPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -export interface PortalAccountRbacPostRequest { - select?: string; - prefer?: PortalAccountRbacPostPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -/** - * - */ -export class PortalAccountRbacApi extends runtime.BaseAPI { - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts deleted file mode 100644 index f7db3d925..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccounts, -} from '../models/index'; -import { - PortalAccountsFromJSON, - PortalAccountsToJSON, -} from '../models/index'; - -export interface PortalAccountsDeleteRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsDeletePreferEnum; -} - -export interface PortalAccountsGetRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountsGetPreferEnum; -} - -export interface PortalAccountsPatchRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsPatchPreferEnum; - portalAccounts?: PortalAccounts; -} - -export interface PortalAccountsPostRequest { - select?: string; - prefer?: PortalAccountsPostPreferEnum; - portalAccounts?: PortalAccounts; -} - -/** - * - */ -export class PortalAccountsApi extends runtime.BaseAPI { - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPatchRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; -/** - * @export - */ -export const PortalAccountsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts deleted file mode 100644 index 05f0a6095..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplicationRbac, -} from '../models/index'; -import { - PortalApplicationRbacFromJSON, - PortalApplicationRbacToJSON, -} from '../models/index'; - -export interface PortalApplicationRbacDeleteRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacDeletePreferEnum; -} - -export interface PortalApplicationRbacGetRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationRbacGetPreferEnum; -} - -export interface PortalApplicationRbacPatchRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacPatchPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -export interface PortalApplicationRbacPostRequest { - select?: string; - prefer?: PortalApplicationRbacPostPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -/** - * - */ -export class PortalApplicationRbacApi extends runtime.BaseAPI { - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts deleted file mode 100644 index 4161669cc..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplications, -} from '../models/index'; -import { - PortalApplicationsFromJSON, - PortalApplicationsToJSON, -} from '../models/index'; - -export interface PortalApplicationsDeleteRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsDeletePreferEnum; -} - -export interface PortalApplicationsGetRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationsGetPreferEnum; -} - -export interface PortalApplicationsPatchRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsPatchPreferEnum; - portalApplications?: PortalApplications; -} - -export interface PortalApplicationsPostRequest { - select?: string; - prefer?: PortalApplicationsPostPreferEnum; - portalApplications?: PortalApplications; -} - -/** - * - */ -export class PortalApplicationsApi extends runtime.BaseAPI { - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts deleted file mode 100644 index 6400389ad..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalPlans, -} from '../models/index'; -import { - PortalPlansFromJSON, - PortalPlansToJSON, -} from '../models/index'; - -export interface PortalPlansDeleteRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansDeletePreferEnum; -} - -export interface PortalPlansGetRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalPlansGetPreferEnum; -} - -export interface PortalPlansPatchRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansPatchPreferEnum; - portalPlans?: PortalPlans; -} - -export interface PortalPlansPostRequest { - select?: string; - prefer?: PortalPlansPostPreferEnum; - portalPlans?: PortalPlans; -} - -/** - * - */ -export class PortalPlansApi extends runtime.BaseAPI { - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalPlansGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPatchRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalPlansDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; -/** - * @export - */ -export const PortalPlansGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; -/** - * @export - */ -export const PortalPlansPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; -/** - * @export - */ -export const PortalPlansPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts deleted file mode 100644 index 86b57d8ce..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcArmorPostRequest, -} from '../models/index'; -import { - RpcArmorPostRequestFromJSON, - RpcArmorPostRequestToJSON, -} from '../models/index'; - -export interface RpcArmorGetRequest { - : string; -} - -export interface RpcArmorPostOperationRequest { - rpcArmorPostRequest: RpcArmorPostRequest; - prefer?: RpcArmorPostOperationPreferEnum; -} - -/** - * - */ -export class RpcArmorApi extends runtime.BaseAPI { - - /** - */ - async rpcArmorGetRaw(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcArmorGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/armor`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcArmorGet(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcArmorGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcArmorPostRaw(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcArmorPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcArmorPostRequest', - 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcArmorPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/armor`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcArmorPost(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcArmorPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcArmorPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcArmorPostOperationPreferEnum = typeof RpcArmorPostOperationPreferEnum[keyof typeof RpcArmorPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts deleted file mode 100644 index 22c7d3980..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcDearmorGetRequest { - : string; -} - -export interface RpcDearmorPostRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcDearmorPostPreferEnum; -} - -/** - * - */ -export class RpcDearmorApi extends runtime.BaseAPI { - - /** - */ - async rpcDearmorGetRaw(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcDearmorGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/dearmor`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcDearmorGet(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcDearmorGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcDearmorPostRaw(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcDearmorPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/dearmor`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcDearmorPost(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcDearmorPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcDearmorPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcDearmorPostPreferEnum = typeof RpcDearmorPostPreferEnum[keyof typeof RpcDearmorPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts deleted file mode 100644 index f134d68a8..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -export interface RpcGenRandomUuidPostRequest { - body: object; - prefer?: RpcGenRandomUuidPostPreferEnum; -} - -/** - * - */ -export class RpcGenRandomUuidApi extends runtime.BaseAPI { - - /** - */ - async rpcGenRandomUuidGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/gen_random_uuid`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenRandomUuidGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenRandomUuidGetRaw(initOverrides); - } - - /** - */ - async rpcGenRandomUuidPostRaw(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling rpcGenRandomUuidPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/gen_random_uuid`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'] as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenRandomUuidPost(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenRandomUuidPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcGenRandomUuidPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcGenRandomUuidPostPreferEnum = typeof RpcGenRandomUuidPostPreferEnum[keyof typeof RpcGenRandomUuidPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts deleted file mode 100644 index e8864684b..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcGenSaltGetRequest { - : string; -} - -export interface RpcGenSaltPostOperationRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcGenSaltPostOperationPreferEnum; -} - -/** - * - */ -export class RpcGenSaltApi extends runtime.BaseAPI { - - /** - */ - async rpcGenSaltGetRaw(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcGenSaltGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/gen_salt`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenSaltGet(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenSaltGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcGenSaltPostRaw(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcGenSaltPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/gen_salt`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenSaltPost(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenSaltPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcGenSaltPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcGenSaltPostOperationPreferEnum = typeof RpcGenSaltPostOperationPreferEnum[keyof typeof RpcGenSaltPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts deleted file mode 100644 index 7bf04ba44..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcPgpArmorHeadersGetRequest { - : string; -} - -export interface RpcPgpArmorHeadersPostRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcPgpArmorHeadersPostPreferEnum; -} - -/** - * - */ -export class RpcPgpArmorHeadersApi extends runtime.BaseAPI { - - /** - */ - async rpcPgpArmorHeadersGetRaw(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcPgpArmorHeadersGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/pgp_armor_headers`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpArmorHeadersGet(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpArmorHeadersGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcPgpArmorHeadersPostRaw(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcPgpArmorHeadersPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/pgp_armor_headers`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpArmorHeadersPost(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpArmorHeadersPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcPgpArmorHeadersPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcPgpArmorHeadersPostPreferEnum = typeof RpcPgpArmorHeadersPostPreferEnum[keyof typeof RpcPgpArmorHeadersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts deleted file mode 100644 index 1e93c1f94..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcArmorPostRequest, -} from '../models/index'; -import { - RpcArmorPostRequestFromJSON, - RpcArmorPostRequestToJSON, -} from '../models/index'; - -export interface RpcPgpKeyIdGetRequest { - : string; -} - -export interface RpcPgpKeyIdPostRequest { - rpcArmorPostRequest: RpcArmorPostRequest; - prefer?: RpcPgpKeyIdPostPreferEnum; -} - -/** - * - */ -export class RpcPgpKeyIdApi extends runtime.BaseAPI { - - /** - */ - async rpcPgpKeyIdGetRaw(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcPgpKeyIdGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/pgp_key_id`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpKeyIdGet(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpKeyIdGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcPgpKeyIdPostRaw(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcArmorPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcArmorPostRequest', - 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcPgpKeyIdPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/pgp_key_id`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpKeyIdPost(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpKeyIdPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcPgpKeyIdPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcPgpKeyIdPostPreferEnum = typeof RpcPgpKeyIdPostPreferEnum[keyof typeof RpcPgpKeyIdPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts deleted file mode 100644 index 9e4f193fc..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceEndpoints, -} from '../models/index'; -import { - ServiceEndpointsFromJSON, - ServiceEndpointsToJSON, -} from '../models/index'; - -export interface ServiceEndpointsDeleteRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsDeletePreferEnum; -} - -export interface ServiceEndpointsGetRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceEndpointsGetPreferEnum; -} - -export interface ServiceEndpointsPatchRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsPatchPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -export interface ServiceEndpointsPostRequest { - select?: string; - prefer?: ServiceEndpointsPostPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -/** - * - */ -export class ServiceEndpointsApi extends runtime.BaseAPI { - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceEndpointsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; -/** - * @export - */ -export const ServiceEndpointsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts deleted file mode 100644 index 1a5f43ac7..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceFallbacks, -} from '../models/index'; -import { - ServiceFallbacksFromJSON, - ServiceFallbacksToJSON, -} from '../models/index'; - -export interface ServiceFallbacksDeleteRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksDeletePreferEnum; -} - -export interface ServiceFallbacksGetRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceFallbacksGetPreferEnum; -} - -export interface ServiceFallbacksPatchRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksPatchPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -export interface ServiceFallbacksPostRequest { - select?: string; - prefer?: ServiceFallbacksPostPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -/** - * - */ -export class ServiceFallbacksApi extends runtime.BaseAPI { - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceFallbacksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; -/** - * @export - */ -export const ServiceFallbacksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts deleted file mode 100644 index 36471e815..000000000 --- a/portal-db/sdk/typescript/src/apis/ServicesApi.ts +++ /dev/null @@ -1,532 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Services, -} from '../models/index'; -import { - ServicesFromJSON, - ServicesToJSON, -} from '../models/index'; - -export interface ServicesDeleteRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesDeletePreferEnum; -} - -export interface ServicesGetRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServicesGetPreferEnum; -} - -export interface ServicesPatchRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesPatchPreferEnum; - services?: Services; -} - -export interface ServicesPostRequest { - select?: string; - prefer?: ServicesPostPreferEnum; - services?: Services; -} - -/** - * - */ -export class ServicesApi extends runtime.BaseAPI { - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.servicesGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServicesDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; -/** - * @export - */ -export const ServicesGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; -/** - * @export - */ -export const ServicesPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; -/** - * @export - */ -export const ServicesPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts deleted file mode 100644 index 9d9f59f95..000000000 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './IntrospectionApi'; -export * from './NetworksApi'; -export * from './OrganizationsApi'; -export * from './PortalAccountRbacApi'; -export * from './PortalAccountsApi'; -export * from './PortalApplicationRbacApi'; -export * from './PortalApplicationsApi'; -export * from './PortalPlansApi'; -export * from './RpcArmorApi'; -export * from './RpcDearmorApi'; -export * from './RpcGenRandomUuidApi'; -export * from './RpcGenSaltApi'; -export * from './RpcPgpArmorHeadersApi'; -export * from './RpcPgpKeyIdApi'; -export * from './ServiceEndpointsApi'; -export * from './ServiceFallbacksApi'; -export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts deleted file mode 100644 index bebe8bbbe..000000000 --- a/portal-db/sdk/typescript/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts deleted file mode 100644 index 8ff34b54a..000000000 --- a/portal-db/sdk/typescript/src/models/Networks.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - * @export - * @interface Networks - */ -export interface Networks { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Networks - */ - networkId: string; -} - -/** - * Check if a given object implements the Networks interface. - */ -export function instanceOfNetworks(value: object): value is Networks { - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function NetworksFromJSON(json: any): Networks { - return NetworksFromJSONTyped(json, false); -} - -export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { - if (json == null) { - return json; - } - return { - - 'networkId': json['network_id'], - }; -} - -export function NetworksToJSON(json: any): Networks { - return NetworksToJSONTyped(json, false); -} - -export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'network_id': value['networkId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts deleted file mode 100644 index 3c35c6a79..000000000 --- a/portal-db/sdk/typescript/src/models/Organizations.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Companies or customer groups that can be attached to Portal Accounts - * @export - * @interface Organizations - */ -export interface Organizations { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof Organizations - */ - organizationId: number; - /** - * Name of the organization - * @type {string} - * @memberof Organizations - */ - organizationName: string; - /** - * Soft delete timestamp - * @type {string} - * @memberof Organizations - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Organizations interface. - */ -export function instanceOfOrganizations(value: object): value is Organizations { - if (!('organizationId' in value) || value['organizationId'] === undefined) return false; - if (!('organizationName' in value) || value['organizationName'] === undefined) return false; - return true; -} - -export function OrganizationsFromJSON(json: any): Organizations { - return OrganizationsFromJSONTyped(json, false); -} - -export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { - if (json == null) { - return json; - } - return { - - 'organizationId': json['organization_id'], - 'organizationName': json['organization_name'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function OrganizationsToJSON(json: any): Organizations { - return OrganizationsToJSONTyped(json, false); -} - -export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'organization_id': value['organizationId'], - 'organization_name': value['organizationName'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts deleted file mode 100644 index b605719a0..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User roles and permissions for specific portal accounts - * @export - * @interface PortalAccountRbac - */ -export interface PortalAccountRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalAccountRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalAccountRbac - */ - roleName: string; - /** - * - * @type {boolean} - * @memberof PortalAccountRbac - */ - userJoinedAccount?: boolean; -} - -/** - * Check if a given object implements the PortalAccountRbac interface. - */ -export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - if (!('roleName' in value) || value['roleName'] === undefined) return false; - return true; -} - -export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { - return PortalAccountRbacFromJSONTyped(json, false); -} - -export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalAccountId': json['portal_account_id'], - 'portalUserId': json['portal_user_id'], - 'roleName': json['role_name'], - 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], - }; -} - -export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { - return PortalAccountRbacToJSONTyped(json, false); -} - -export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_account_id': value['portalAccountId'], - 'portal_user_id': value['portalUserId'], - 'role_name': value['roleName'], - 'user_joined_account': value['userJoinedAccount'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts deleted file mode 100644 index ee2b80517..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccounts.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Multi-tenant accounts with plans and billing integration - * @export - * @interface PortalAccounts - */ -export interface PortalAccounts { - /** - * Unique identifier for the portal account - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalAccounts - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `organizations.organization_id`. - * @type {number} - * @memberof PortalAccounts - */ - organizationId?: number; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalAccounts - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - userAccountName?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - internalAccountName?: string; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - billingType?: string; - /** - * Stripe subscription identifier for billing - * @type {string} - * @memberof PortalAccounts - */ - stripeSubscriptionId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpAccountId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalAccountsPortalAccountUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalAccounts interface. - */ -export function instanceOfPortalAccounts(value: object): value is PortalAccounts { - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalAccountsFromJSON(json: any): PortalAccounts { - return PortalAccountsFromJSONTyped(json, false); -} - -export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'], - 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], - 'portalPlanType': json['portal_plan_type'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], - 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], - 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalAccountsToJSON(json: any): PortalAccounts { - return PortalAccountsToJSONTyped(json, false); -} - -export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'organization_id': value['organizationId'], - 'portal_plan_type': value['portalPlanType'], - 'user_account_name': value['userAccountName'], - 'internal_account_name': value['internalAccountName'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], - 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], - 'billing_type': value['billingType'], - 'stripe_subscription_id': value['stripeSubscriptionId'], - 'gcp_account_id': value['gcpAccountId'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts deleted file mode 100644 index 5216b4f8a..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User access controls for specific applications - * @export - * @interface PortalApplicationRbac - */ -export interface PortalApplicationRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalApplicationRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_applications.portal_application_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the PortalApplicationRbac interface. - */ -export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - return true; -} - -export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacFromJSONTyped(json, false); -} - -export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalApplicationId': json['portal_application_id'], - 'portalUserId': json['portal_user_id'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacToJSONTyped(json, false); -} - -export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_application_id': value['portalApplicationId'], - 'portal_user_id': value['portalUserId'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts deleted file mode 100644 index 08c5953bc..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplications.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Applications created within portal accounts with their own rate limits and settings - * @export - * @interface PortalApplications - */ -export interface PortalApplications { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalApplications - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalApplications - */ - portalAccountId: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationName?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - emoji?: string; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationDescription?: string; - /** - * - * @type {Array} - * @memberof PortalApplications - */ - favoriteServiceIds?: Array; - /** - * Hashed secret key for application authentication - * @type {string} - * @memberof PortalApplications - */ - secretKeyHash?: string; - /** - * - * @type {boolean} - * @memberof PortalApplications - */ - secretKeyRequired?: boolean; - /** - * - * @type {string} - * @memberof PortalApplications - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalApplications interface. - */ -export function instanceOfPortalApplications(value: object): value is PortalApplications { - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - return true; -} - -export function PortalApplicationsFromJSON(json: any): PortalApplications { - return PortalApplicationsFromJSONTyped(json, false); -} - -export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { - if (json == null) { - return json; - } - return { - - 'portalApplicationId': json['portal_application_id'], - 'portalAccountId': json['portal_account_id'], - 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], - 'emoji': json['emoji'] == null ? undefined : json['emoji'], - 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], - 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], - 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], - 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], - 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], - 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], - 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationsToJSON(json: any): PortalApplications { - return PortalApplicationsToJSONTyped(json, false); -} - -export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_application_id': value['portalApplicationId'], - 'portal_account_id': value['portalAccountId'], - 'portal_application_name': value['portalApplicationName'], - 'emoji': value['emoji'], - 'portal_application_user_limit': value['portalApplicationUserLimit'], - 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], - 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], - 'portal_application_description': value['portalApplicationDescription'], - 'favorite_service_ids': value['favoriteServiceIds'], - 'secret_key_hash': value['secretKeyHash'], - 'secret_key_required': value['secretKeyRequired'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts deleted file mode 100644 index d89b2b209..000000000 --- a/portal-db/sdk/typescript/src/models/PortalPlans.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available subscription plans for Portal Accounts - * @export - * @interface PortalPlans - */ -export interface PortalPlans { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalPlans - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalPlans - */ - portalPlanTypeDescription?: string; - /** - * Maximum usage allowed within the interval - * @type {number} - * @memberof PortalPlans - */ - planUsageLimit?: number; - /** - * - * @type {string} - * @memberof PortalPlans - */ - planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; - /** - * Rate limit in requests per second - * @type {number} - * @memberof PortalPlans - */ - planRateLimitRps?: number; - /** - * - * @type {number} - * @memberof PortalPlans - */ - planApplicationLimit?: number; -} - - -/** - * @export - */ -export const PortalPlansPlanUsageLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalPlans interface. - */ -export function instanceOfPortalPlans(value: object): value is PortalPlans { - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalPlansFromJSON(json: any): PortalPlans { - return PortalPlansFromJSONTyped(json, false); -} - -export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { - if (json == null) { - return json; - } - return { - - 'portalPlanType': json['portal_plan_type'], - 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], - 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], - 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], - 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], - 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], - }; -} - -export function PortalPlansToJSON(json: any): PortalPlans { - return PortalPlansToJSONTyped(json, false); -} - -export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_plan_type': value['portalPlanType'], - 'portal_plan_type_description': value['portalPlanTypeDescription'], - 'plan_usage_limit': value['planUsageLimit'], - 'plan_usage_limit_interval': value['planUsageLimitInterval'], - 'plan_rate_limit_rps': value['planRateLimitRps'], - 'plan_application_limit': value['planApplicationLimit'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts deleted file mode 100644 index 8ad6bc8bf..000000000 --- a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RpcArmorPostRequest - */ -export interface RpcArmorPostRequest { - /** - * - * @type {string} - * @memberof RpcArmorPostRequest - */ - : string; -} - -/** - * Check if a given object implements the RpcArmorPostRequest interface. - */ -export function instanceOfRpcArmorPostRequest(value: object): value is RpcArmorPostRequest { - if (!('' in value) || value[''] === undefined) return false; - return true; -} - -export function RpcArmorPostRequestFromJSON(json: any): RpcArmorPostRequest { - return RpcArmorPostRequestFromJSONTyped(json, false); -} - -export function RpcArmorPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcArmorPostRequest { - if (json == null) { - return json; - } - return { - - '': json[''], - }; -} - -export function RpcArmorPostRequestToJSON(json: any): RpcArmorPostRequest { - return RpcArmorPostRequestToJSONTyped(json, false); -} - -export function RpcArmorPostRequestToJSONTyped(value?: RpcArmorPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - '': value[''], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts deleted file mode 100644 index d09a9f460..000000000 --- a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RpcGenSaltPostRequest - */ -export interface RpcGenSaltPostRequest { - /** - * - * @type {string} - * @memberof RpcGenSaltPostRequest - */ - : string; -} - -/** - * Check if a given object implements the RpcGenSaltPostRequest interface. - */ -export function instanceOfRpcGenSaltPostRequest(value: object): value is RpcGenSaltPostRequest { - if (!('' in value) || value[''] === undefined) return false; - return true; -} - -export function RpcGenSaltPostRequestFromJSON(json: any): RpcGenSaltPostRequest { - return RpcGenSaltPostRequestFromJSONTyped(json, false); -} - -export function RpcGenSaltPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcGenSaltPostRequest { - if (json == null) { - return json; - } - return { - - '': json[''], - }; -} - -export function RpcGenSaltPostRequestToJSON(json: any): RpcGenSaltPostRequest { - return RpcGenSaltPostRequestToJSONTyped(json, false); -} - -export function RpcGenSaltPostRequestToJSONTyped(value?: RpcGenSaltPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - '': value[''], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts deleted file mode 100644 index 516acad4a..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available endpoint types for each service - * @export - * @interface ServiceEndpoints - */ -export interface ServiceEndpoints { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceEndpoints - */ - endpointId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceEndpoints - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - endpointType?: ServiceEndpointsEndpointTypeEnum; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const ServiceEndpointsEndpointTypeEnum = { - CometBft: 'cometBFT', - Cosmos: 'cosmos', - Rest: 'REST', - JsonRpc: 'JSON-RPC', - Wss: 'WSS', - GRpc: 'gRPC' -} as const; -export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; - - -/** - * Check if a given object implements the ServiceEndpoints interface. - */ -export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { - if (!('endpointId' in value) || value['endpointId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - return true; -} - -export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { - return ServiceEndpointsFromJSONTyped(json, false); -} - -export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { - if (json == null) { - return json; - } - return { - - 'endpointId': json['endpoint_id'], - 'serviceId': json['service_id'], - 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { - return ServiceEndpointsToJSONTyped(json, false); -} - -export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'endpoint_id': value['endpointId'], - 'service_id': value['serviceId'], - 'endpoint_type': value['endpointType'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts deleted file mode 100644 index a10559ad2..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Fallback URLs for services when primary endpoints fail - * @export - * @interface ServiceFallbacks - */ -export interface ServiceFallbacks { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceFallbacks - */ - serviceFallbackId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceFallbacks - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - fallbackUrl: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the ServiceFallbacks interface. - */ -export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { - if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; - return true; -} - -export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { - return ServiceFallbacksFromJSONTyped(json, false); -} - -export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { - if (json == null) { - return json; - } - return { - - 'serviceFallbackId': json['service_fallback_id'], - 'serviceId': json['service_id'], - 'fallbackUrl': json['fallback_url'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { - return ServiceFallbacksToJSONTyped(json, false); -} - -export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_fallback_id': value['serviceFallbackId'], - 'service_id': value['serviceId'], - 'fallback_url': value['fallbackUrl'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts deleted file mode 100644 index 766a36099..000000000 --- a/portal-db/sdk/typescript/src/models/Services.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain services from the Pocket Network - * @export - * @interface Services - */ -export interface Services { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Services - */ - serviceId: string; - /** - * - * @type {string} - * @memberof Services - */ - serviceName: string; - /** - * Cost in compute units for each relay - * @type {number} - * @memberof Services - */ - computeUnitsPerRelay?: number; - /** - * Valid domains for this service - * @type {Array} - * @memberof Services - */ - serviceDomains: Array; - /** - * - * @type {string} - * @memberof Services - */ - serviceOwnerAddress?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Services - */ - networkId?: string; - /** - * - * @type {boolean} - * @memberof Services - */ - active?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - beta?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - comingSoon?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - qualityFallbackEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - hardFallbackEnabled?: boolean; - /** - * - * @type {string} - * @memberof Services - */ - svgIcon?: string; - /** - * - * @type {string} - * @memberof Services - */ - publicEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusQuery?: string; - /** - * - * @type {string} - * @memberof Services - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Services interface. - */ -export function instanceOfServices(value: object): value is Services { - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('serviceName' in value) || value['serviceName'] === undefined) return false; - if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; - return true; -} - -export function ServicesFromJSON(json: any): Services { - return ServicesFromJSONTyped(json, false); -} - -export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { - if (json == null) { - return json; - } - return { - - 'serviceId': json['service_id'], - 'serviceName': json['service_name'], - 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], - 'serviceDomains': json['service_domains'], - 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], - 'networkId': json['network_id'] == null ? undefined : json['network_id'], - 'active': json['active'] == null ? undefined : json['active'], - 'beta': json['beta'] == null ? undefined : json['beta'], - 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], - 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], - 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], - 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], - 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], - 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], - 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServicesToJSON(json: any): Services { - return ServicesToJSONTyped(json, false); -} - -export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_id': value['serviceId'], - 'service_name': value['serviceName'], - 'compute_units_per_relay': value['computeUnitsPerRelay'], - 'service_domains': value['serviceDomains'], - 'service_owner_address': value['serviceOwnerAddress'], - 'network_id': value['networkId'], - 'active': value['active'], - 'beta': value['beta'], - 'coming_soon': value['comingSoon'], - 'quality_fallback_enabled': value['qualityFallbackEnabled'], - 'hard_fallback_enabled': value['hardFallbackEnabled'], - 'svg_icon': value['svgIcon'], - 'public_endpoint_url': value['publicEndpointUrl'], - 'status_endpoint_url': value['statusEndpointUrl'], - 'status_query': value['statusQuery'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts deleted file mode 100644 index 316dd6fee..000000000 --- a/portal-db/sdk/typescript/src/models/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Networks'; -export * from './Organizations'; -export * from './PortalAccountRbac'; -export * from './PortalAccounts'; -export * from './PortalApplicationRbac'; -export * from './PortalApplications'; -export * from './PortalPlans'; -export * from './RpcArmorPostRequest'; -export * from './RpcGenSaltPostRequest'; -export * from './ServiceEndpoints'; -export * from './ServiceFallbacks'; -export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts deleted file mode 100644 index f4d9fba5c..000000000 --- a/portal-db/sdk/typescript/src/runtime.ts +++ /dev/null @@ -1,432 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - -export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json deleted file mode 100644 index 4567ec198..000000000 --- a/portal-db/sdk/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -} From 82e808b95cfdf2482e60121a6d6164a6ad13bb9d Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 7 Oct 2025 14:55:00 +0100 Subject: [PATCH 32/43] add typescript SDK --- portal-db/api/codegen/generate-sdks.sh | 185 +++++- portal-db/sdk/typescript/.gitignore | 4 + portal-db/sdk/typescript/.npmignore | 1 + .../sdk/typescript/.openapi-generator-ignore | 23 + .../sdk/typescript/.openapi-generator/FILES | 39 ++ .../sdk/typescript/.openapi-generator/VERSION | 1 + portal-db/sdk/typescript/README.md | 46 ++ portal-db/sdk/typescript/package.json | 19 + .../typescript/src/apis/IntrospectionApi.ts | 51 ++ .../sdk/typescript/src/apis/NetworksApi.ts | 277 +++++++++ .../typescript/src/apis/OrganizationsApi.ts | 337 +++++++++++ .../src/apis/PortalAccountRbacApi.ts | 337 +++++++++++ .../typescript/src/apis/PortalAccountsApi.ts | 487 ++++++++++++++++ .../src/apis/PortalApplicationRbacApi.ts | 337 +++++++++++ .../src/apis/PortalApplicationsApi.ts | 472 ++++++++++++++++ .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 ++++++++++++ .../sdk/typescript/src/apis/RpcArmorApi.ts | 124 ++++ .../sdk/typescript/src/apis/RpcDearmorApi.ts | 124 ++++ .../src/apis/RpcGenRandomUuidApi.ts | 102 ++++ .../sdk/typescript/src/apis/RpcGenSaltApi.ts | 124 ++++ .../src/apis/RpcPgpArmorHeadersApi.ts | 124 ++++ .../sdk/typescript/src/apis/RpcPgpKeyIdApi.ts | 124 ++++ .../src/apis/ServiceEndpointsApi.ts | 337 +++++++++++ .../src/apis/ServiceFallbacksApi.ts | 337 +++++++++++ .../sdk/typescript/src/apis/ServicesApi.ts | 532 ++++++++++++++++++ portal-db/sdk/typescript/src/apis/index.ts | 19 + portal-db/sdk/typescript/src/index.ts | 5 + .../sdk/typescript/src/models/Networks.ts | 67 +++ .../typescript/src/models/Organizations.ts | 100 ++++ .../src/models/PortalAccountRbac.ts | 104 ++++ .../typescript/src/models/PortalAccounts.ts | 196 +++++++ .../src/models/PortalApplicationRbac.ts | 103 ++++ .../src/models/PortalApplications.ts | 185 ++++++ .../sdk/typescript/src/models/PortalPlans.ts | 119 ++++ .../src/models/RpcArmorPostRequest.ts | 66 +++ .../src/models/RpcGenSaltPostRequest.ts | 66 +++ .../typescript/src/models/ServiceEndpoints.ts | 116 ++++ .../typescript/src/models/ServiceFallbacks.ts | 102 ++++ .../sdk/typescript/src/models/Services.ts | 206 +++++++ portal-db/sdk/typescript/src/models/index.ts | 14 + portal-db/sdk/typescript/src/runtime.ts | 432 ++++++++++++++ portal-db/sdk/typescript/tsconfig.json | 20 + 42 files changed, 6812 insertions(+), 4 deletions(-) create mode 100644 portal-db/sdk/typescript/.gitignore create mode 100644 portal-db/sdk/typescript/.npmignore create mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore create mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES create mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION create mode 100644 portal-db/sdk/typescript/README.md create mode 100644 portal-db/sdk/typescript/package.json create mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcArmorApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/index.ts create mode 100644 portal-db/sdk/typescript/src/index.ts create mode 100644 portal-db/sdk/typescript/src/models/Networks.ts create mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts create mode 100644 portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts create mode 100644 portal-db/sdk/typescript/src/models/Services.ts create mode 100644 portal-db/sdk/typescript/src/models/index.ts create mode 100644 portal-db/sdk/typescript/src/runtime.ts create mode 100644 portal-db/sdk/typescript/tsconfig.json diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index a7a4ad9da..13ffec66b 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -1,8 +1,9 @@ #!/bin/bash -# Generate Go SDK from OpenAPI specification -# This script generates a Go SDK for the Portal DB API +# Generate Go and TypeScript SDKs from OpenAPI specification +# This script generates both Go and TypeScript SDKs for the Portal DB API # - Go SDK: Uses oapi-codegen for client and models generation +# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation set -e @@ -11,6 +12,7 @@ OPENAPI_DIR="../openapi" OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" GO_OUTPUT_DIR="../../sdk/go" +TS_OUTPUT_DIR="../../sdk/typescript" CONFIG_MODELS="./codegen-models.yaml" CONFIG_CLIENT="./codegen-client.yaml" POSTGREST_URL="http://localhost:3000" @@ -22,7 +24,7 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -echo "๐Ÿ”ง Generating Go SDK from OpenAPI specification..." +echo "๐Ÿ”ง Generating Go and TypeScript SDKs from OpenAPI specification..." # ============================================================================ # PHASE 1: ENVIRONMENT VALIDATION @@ -55,6 +57,55 @@ fi echo -e "${GREEN}โœ… oapi-codegen is available: $(oapi-codegen -version 2>/dev/null || echo 'installed')${NC}" +# Check if Node.js and npm are installed for TypeScript SDK generation +if ! command -v node >/dev/null 2>&1; then + echo -e "${RED}โŒ Node.js is not installed. Please install Node.js first.${NC}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 +fi + +echo -e "${GREEN}โœ… Node.js is installed: $(node --version)${NC}" + +if ! command -v npm >/dev/null 2>&1; then + echo -e "${RED}โŒ npm is not installed. Please install npm first.${NC}" + exit 1 +fi + +echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" + +# Check if Java is installed +if ! command -v java >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" + echo " Install Java: brew install openjdk" + exit 1 +fi + +# Verify Java is working properly +if ! java -version >/dev/null 2>&1; then + echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" + echo " Fix Java installation: brew install openjdk" + echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" + exit 1 +fi + +JAVA_VERSION=$(java -version 2>&1 | head -n1) +echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" + +# Check if openapi-generator-cli is installed +if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo "๐Ÿ“ฆ Installing openapi-generator-cli..." + npm install -g @openapitools/openapi-generator-cli + + # Verify installation + if ! command -v openapi-generator-cli >/dev/null 2>&1; then + echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" + exit 1 + fi +fi + +echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" + # Check if PostgREST is running echo "๐ŸŒ Checking PostgREST availability..." if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then @@ -180,6 +231,31 @@ fi echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" +echo "" +echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." + +# Create TypeScript output directory if it doesn't exist +mkdir -p "$TS_OUTPUT_DIR" + +# Clean previous generated TypeScript files (keep permanent files) +echo "๐Ÿงน Cleaning previous TypeScript generated files..." +rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" + +# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) +echo " Generating TypeScript client with built-in methods..." +if ! openapi-generator-cli generate \ + -i "$OPENAPI_V3_FILE" \ + -g typescript-fetch \ + -o "$TS_OUTPUT_DIR" \ + --skip-validate-spec \ + --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then + echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" + exit 1 +fi + + +echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" + # ============================================================================ # PHASE 4: MODULE SETUP # ============================================================================ @@ -213,6 +289,86 @@ echo -e "${GREEN}โœ… Generated code compiles successfully${NC}" # Return to scripts directory cd - >/dev/null +# TypeScript module setup +echo "" +echo "๐Ÿ”ท Setting up TypeScript module..." + +# Navigate to TypeScript SDK directory +cd "$TS_OUTPUT_DIR" + +# Create package.json if it doesn't exist +if [ ! -f "package.json" ]; then + echo "๐Ÿ“ฆ Creating package.json..." + cat > package.json << 'EOF' +{ + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "description": "TypeScript SDK for Grove Portal DB API", + "main": "index.ts", + "types": "types.d.ts", + "scripts": { + "build": "tsc", + "type-check": "tsc --noEmit" + }, + "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], + "author": "Grove Team", + "license": "MIT", + "devDependencies": { + "typescript": "^5.0.0" + }, + "peerDependencies": { + "typescript": ">=4.5.0" + } +} +EOF +fi + +# Create tsconfig.json if it doesn't exist +if [ ! -f "tsconfig.json" ]; then + echo "๐Ÿ”ง Creating tsconfig.json..." + cat > tsconfig.json << 'EOF' +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020", "DOM"], + "moduleResolution": "Bundler", + "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "outDir": "./dist" + }, + "include": ["src/**/*", "models/**/*", "apis/**/*"], + "exclude": ["node_modules", "dist"] +} +EOF +fi + +echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" + +# Test TypeScript compilation if TypeScript is available +if command -v tsc >/dev/null 2>&1; then + echo "๐Ÿ” Validating TypeScript compilation..." + if ! npx tsc --noEmit; then + echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" + echo " This may be due to missing dependencies or configuration issues" + echo " The generated types.ts file should still be usable" + else + echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" + fi +else + echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" + echo " Install TypeScript globally: npm install -g typescript" +fi + +# Return to scripts directory +cd - >/dev/null + # ============================================================================ # SUCCESS SUMMARY # ============================================================================ @@ -223,6 +379,7 @@ echo "" echo -e "${BLUE}๐Ÿ“ Generated Files:${NC}" echo " API Docs: $OPENAPI_V3_FILE" echo " Go SDK: $GO_OUTPUT_DIR" +echo " TypeScript: $TS_OUTPUT_DIR" echo "" echo -e "${BLUE}๐Ÿน Go SDK:${NC}" echo " Module: github.com/buildwithgrove/path/portal-db/sdk/go" @@ -233,6 +390,16 @@ echo " โ€ข client.go - Generated SDK client and methods (updated)" echo " โ€ข go.mod - Go module definition (permanent)" echo " โ€ข README.md - Documentation (permanent)" echo "" +echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" +echo " Package: @grove/portal-db-sdk" +echo " Runtime: Zero dependencies (uses native fetch)" +echo " Files:" +echo " โ€ข apis/ - Generated API client classes (updated)" +echo " โ€ข models/ - Generated TypeScript models (updated)" +echo " โ€ข package.json - Node.js package definition (permanent)" +echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" +echo " โ€ข README.md - Documentation (permanent)" +echo "" echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" echo "" @@ -244,9 +411,19 @@ echo " 2. Review generated client: cat $GO_OUTPUT_DIR/client.go | head -50" echo " 3. Import in your project: go get github.com/buildwithgrove/path/portal-db/sdk/go" echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" echo "" +echo -e "${BLUE}TypeScript SDK:${NC}" +echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" +echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" +echo " 3. Copy to your React project or publish as npm package" +echo " 4. Import client: import { DefaultApi } from './apis'" +echo " 5. Use built-in methods: await client.portalApplicationsGet()" +echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" +echo "" echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" echo " โ€ข Go: Full client with methods, types separated for readability" -echo " โ€ข SDK updates automatically when you run this script" +echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" +echo " โ€ข Both SDKs update automatically when you run this script" echo " โ€ข Run after database schema changes to stay in sync" +echo " โ€ข TypeScript SDK has zero runtime dependencies" echo "" echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/portal-db/sdk/typescript/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore new file mode 100644 index 000000000..42061c01a --- /dev/null +++ b/portal-db/sdk/typescript/.npmignore @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES new file mode 100644 index 000000000..3fe1aaf61 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -0,0 +1,39 @@ +.gitignore +.npmignore +.openapi-generator-ignore +README.md +package.json +src/apis/IntrospectionApi.ts +src/apis/NetworksApi.ts +src/apis/OrganizationsApi.ts +src/apis/PortalAccountRbacApi.ts +src/apis/PortalAccountsApi.ts +src/apis/PortalApplicationRbacApi.ts +src/apis/PortalApplicationsApi.ts +src/apis/PortalPlansApi.ts +src/apis/RpcArmorApi.ts +src/apis/RpcDearmorApi.ts +src/apis/RpcGenRandomUuidApi.ts +src/apis/RpcGenSaltApi.ts +src/apis/RpcPgpArmorHeadersApi.ts +src/apis/RpcPgpKeyIdApi.ts +src/apis/ServiceEndpointsApi.ts +src/apis/ServiceFallbacksApi.ts +src/apis/ServicesApi.ts +src/apis/index.ts +src/index.ts +src/models/Networks.ts +src/models/Organizations.ts +src/models/PortalAccountRbac.ts +src/models/PortalAccounts.ts +src/models/PortalApplicationRbac.ts +src/models/PortalApplications.ts +src/models/PortalPlans.ts +src/models/RpcArmorPostRequest.ts +src/models/RpcGenSaltPostRequest.ts +src/models/ServiceEndpoints.ts +src/models/ServiceFallbacks.ts +src/models/Services.ts +src/models/index.ts +src/runtime.ts +tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION new file mode 100644 index 000000000..e465da431 --- /dev/null +++ b/portal-db/sdk/typescript/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md new file mode 100644 index 000000000..4e066a339 --- /dev/null +++ b/portal-db/sdk/typescript/README.md @@ -0,0 +1,46 @@ +## @grove/portal-db-sdk@12.0.2 (a4e00ff) + +This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run `npm publish` + +### Consuming + +navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install @grove/portal-db-sdk@12.0.2 (a4e00ff) --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save +``` diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json new file mode 100644 index 000000000..2cbb1e8a2 --- /dev/null +++ b/portal-db/sdk/typescript/package.json @@ -0,0 +1,19 @@ +{ + "name": "@grove/portal-db-sdk", + "version": "12.0.2 (a4e00ff)", + "description": "OpenAPI client for @grove/portal-db-sdk", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } +} diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts new file mode 100644 index 000000000..b654b5e25 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +/** + * + */ +export class IntrospectionApi extends runtime.BaseAPI { + + /** + * OpenAPI description (this document) + */ + async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * OpenAPI description (this document) + */ + async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rootGetRaw(initOverrides); + } + +} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts new file mode 100644 index 000000000..7ed2eea64 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/NetworksApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Networks, +} from '../models/index'; +import { + NetworksFromJSON, + NetworksToJSON, +} from '../models/index'; + +export interface NetworksDeleteRequest { + networkId?: string; + prefer?: NetworksDeletePreferEnum; +} + +export interface NetworksGetRequest { + networkId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: NetworksGetPreferEnum; +} + +export interface NetworksPatchRequest { + networkId?: string; + prefer?: NetworksPatchPreferEnum; + networks?: Networks; +} + +export interface NetworksPostRequest { + select?: string; + prefer?: NetworksPostPreferEnum; + networks?: Networks; +} + +/** + * + */ +export class NetworksApi extends runtime.BaseAPI { + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.networksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const NetworksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; +/** + * @export + */ +export const NetworksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; +/** + * @export + */ +export const NetworksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; +/** + * @export + */ +export const NetworksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts new file mode 100644 index 000000000..9944fa2cd --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Organizations, +} from '../models/index'; +import { + OrganizationsFromJSON, + OrganizationsToJSON, +} from '../models/index'; + +export interface OrganizationsDeleteRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsDeletePreferEnum; +} + +export interface OrganizationsGetRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: OrganizationsGetPreferEnum; +} + +export interface OrganizationsPatchRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsPatchPreferEnum; + organizations?: Organizations; +} + +export interface OrganizationsPostRequest { + select?: string; + prefer?: OrganizationsPostPreferEnum; + organizations?: Organizations; +} + +/** + * + */ +export class OrganizationsApi extends runtime.BaseAPI { + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.organizationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const OrganizationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; +/** + * @export + */ +export const OrganizationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; +/** + * @export + */ +export const OrganizationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; +/** + * @export + */ +export const OrganizationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts new file mode 100644 index 000000000..79587e887 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccountRbac, +} from '../models/index'; +import { + PortalAccountRbacFromJSON, + PortalAccountRbacToJSON, +} from '../models/index'; + +export interface PortalAccountRbacDeleteRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacDeletePreferEnum; +} + +export interface PortalAccountRbacGetRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountRbacGetPreferEnum; +} + +export interface PortalAccountRbacPatchRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacPatchPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +export interface PortalAccountRbacPostRequest { + select?: string; + prefer?: PortalAccountRbacPostPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +/** + * + */ +export class PortalAccountRbacApi extends runtime.BaseAPI { + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts new file mode 100644 index 000000000..f7db3d925 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccounts, +} from '../models/index'; +import { + PortalAccountsFromJSON, + PortalAccountsToJSON, +} from '../models/index'; + +export interface PortalAccountsDeleteRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsDeletePreferEnum; +} + +export interface PortalAccountsGetRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountsGetPreferEnum; +} + +export interface PortalAccountsPatchRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsPatchPreferEnum; + portalAccounts?: PortalAccounts; +} + +export interface PortalAccountsPostRequest { + select?: string; + prefer?: PortalAccountsPostPreferEnum; + portalAccounts?: PortalAccounts; +} + +/** + * + */ +export class PortalAccountsApi extends runtime.BaseAPI { + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPatchRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; +/** + * @export + */ +export const PortalAccountsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts new file mode 100644 index 000000000..05f0a6095 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplicationRbac, +} from '../models/index'; +import { + PortalApplicationRbacFromJSON, + PortalApplicationRbacToJSON, +} from '../models/index'; + +export interface PortalApplicationRbacDeleteRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacDeletePreferEnum; +} + +export interface PortalApplicationRbacGetRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationRbacGetPreferEnum; +} + +export interface PortalApplicationRbacPatchRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacPatchPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +export interface PortalApplicationRbacPostRequest { + select?: string; + prefer?: PortalApplicationRbacPostPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +/** + * + */ +export class PortalApplicationRbacApi extends runtime.BaseAPI { + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts new file mode 100644 index 000000000..4161669cc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts @@ -0,0 +1,472 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplications, +} from '../models/index'; +import { + PortalApplicationsFromJSON, + PortalApplicationsToJSON, +} from '../models/index'; + +export interface PortalApplicationsDeleteRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsDeletePreferEnum; +} + +export interface PortalApplicationsGetRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationsGetPreferEnum; +} + +export interface PortalApplicationsPatchRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsPatchPreferEnum; + portalApplications?: PortalApplications; +} + +export interface PortalApplicationsPostRequest { + select?: string; + prefer?: PortalApplicationsPostPreferEnum; + portalApplications?: PortalApplications; +} + +/** + * + */ +export class PortalApplicationsApi extends runtime.BaseAPI { + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts new file mode 100644 index 000000000..6400389ad --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts @@ -0,0 +1,352 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalPlans, +} from '../models/index'; +import { + PortalPlansFromJSON, + PortalPlansToJSON, +} from '../models/index'; + +export interface PortalPlansDeleteRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansDeletePreferEnum; +} + +export interface PortalPlansGetRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalPlansGetPreferEnum; +} + +export interface PortalPlansPatchRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansPatchPreferEnum; + portalPlans?: PortalPlans; +} + +export interface PortalPlansPostRequest { + select?: string; + prefer?: PortalPlansPostPreferEnum; + portalPlans?: PortalPlans; +} + +/** + * + */ +export class PortalPlansApi extends runtime.BaseAPI { + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalPlansGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPatchRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalPlansDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; +/** + * @export + */ +export const PortalPlansGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; +/** + * @export + */ +export const PortalPlansPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; +/** + * @export + */ +export const PortalPlansPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts new file mode 100644 index 000000000..86b57d8ce --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcArmorPostRequest, +} from '../models/index'; +import { + RpcArmorPostRequestFromJSON, + RpcArmorPostRequestToJSON, +} from '../models/index'; + +export interface RpcArmorGetRequest { + : string; +} + +export interface RpcArmorPostOperationRequest { + rpcArmorPostRequest: RpcArmorPostRequest; + prefer?: RpcArmorPostOperationPreferEnum; +} + +/** + * + */ +export class RpcArmorApi extends runtime.BaseAPI { + + /** + */ + async rpcArmorGetRaw(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcArmorGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/armor`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcArmorGet(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcArmorGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcArmorPostRaw(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcArmorPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcArmorPostRequest', + 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcArmorPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/armor`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcArmorPost(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcArmorPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcArmorPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcArmorPostOperationPreferEnum = typeof RpcArmorPostOperationPreferEnum[keyof typeof RpcArmorPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts new file mode 100644 index 000000000..22c7d3980 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcDearmorGetRequest { + : string; +} + +export interface RpcDearmorPostRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcDearmorPostPreferEnum; +} + +/** + * + */ +export class RpcDearmorApi extends runtime.BaseAPI { + + /** + */ + async rpcDearmorGetRaw(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcDearmorGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/dearmor`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcDearmorGet(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcDearmorGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcDearmorPostRaw(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcDearmorPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/dearmor`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcDearmorPost(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcDearmorPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcDearmorPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcDearmorPostPreferEnum = typeof RpcDearmorPostPreferEnum[keyof typeof RpcDearmorPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts new file mode 100644 index 000000000..f134d68a8 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +export interface RpcGenRandomUuidPostRequest { + body: object; + prefer?: RpcGenRandomUuidPostPreferEnum; +} + +/** + * + */ +export class RpcGenRandomUuidApi extends runtime.BaseAPI { + + /** + */ + async rpcGenRandomUuidGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/gen_random_uuid`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenRandomUuidGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenRandomUuidGetRaw(initOverrides); + } + + /** + */ + async rpcGenRandomUuidPostRaw(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling rpcGenRandomUuidPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/gen_random_uuid`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenRandomUuidPost(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenRandomUuidPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcGenRandomUuidPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcGenRandomUuidPostPreferEnum = typeof RpcGenRandomUuidPostPreferEnum[keyof typeof RpcGenRandomUuidPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts new file mode 100644 index 000000000..e8864684b --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcGenSaltGetRequest { + : string; +} + +export interface RpcGenSaltPostOperationRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcGenSaltPostOperationPreferEnum; +} + +/** + * + */ +export class RpcGenSaltApi extends runtime.BaseAPI { + + /** + */ + async rpcGenSaltGetRaw(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcGenSaltGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/gen_salt`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenSaltGet(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenSaltGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcGenSaltPostRaw(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcGenSaltPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/gen_salt`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcGenSaltPost(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcGenSaltPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcGenSaltPostOperationPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcGenSaltPostOperationPreferEnum = typeof RpcGenSaltPostOperationPreferEnum[keyof typeof RpcGenSaltPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts new file mode 100644 index 000000000..7bf04ba44 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcGenSaltPostRequest, +} from '../models/index'; +import { + RpcGenSaltPostRequestFromJSON, + RpcGenSaltPostRequestToJSON, +} from '../models/index'; + +export interface RpcPgpArmorHeadersGetRequest { + : string; +} + +export interface RpcPgpArmorHeadersPostRequest { + rpcGenSaltPostRequest: RpcGenSaltPostRequest; + prefer?: RpcPgpArmorHeadersPostPreferEnum; +} + +/** + * + */ +export class RpcPgpArmorHeadersApi extends runtime.BaseAPI { + + /** + */ + async rpcPgpArmorHeadersGetRaw(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcPgpArmorHeadersGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/pgp_armor_headers`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpArmorHeadersGet(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpArmorHeadersGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcPgpArmorHeadersPostRaw(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcGenSaltPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcGenSaltPostRequest', + 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcPgpArmorHeadersPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/pgp_armor_headers`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpArmorHeadersPost(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpArmorHeadersPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcPgpArmorHeadersPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcPgpArmorHeadersPostPreferEnum = typeof RpcPgpArmorHeadersPostPreferEnum[keyof typeof RpcPgpArmorHeadersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts new file mode 100644 index 000000000..1e93c1f94 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + RpcArmorPostRequest, +} from '../models/index'; +import { + RpcArmorPostRequestFromJSON, + RpcArmorPostRequestToJSON, +} from '../models/index'; + +export interface RpcPgpKeyIdGetRequest { + : string; +} + +export interface RpcPgpKeyIdPostRequest { + rpcArmorPostRequest: RpcArmorPostRequest; + prefer?: RpcPgpKeyIdPostPreferEnum; +} + +/** + * + */ +export class RpcPgpKeyIdApi extends runtime.BaseAPI { + + /** + */ + async rpcPgpKeyIdGetRaw(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters[''] == null) { + throw new runtime.RequiredError( + '', + 'Required parameter "" was null or undefined when calling rpcPgpKeyIdGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters[''] != null) { + queryParameters[''] = requestParameters['']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/rpc/pgp_key_id`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpKeyIdGet(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpKeyIdGetRaw(requestParameters, initOverrides); + } + + /** + */ + async rpcPgpKeyIdPostRaw(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['rpcArmorPostRequest'] == null) { + throw new runtime.RequiredError( + 'rpcArmorPostRequest', + 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcPgpKeyIdPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/rpc/pgp_key_id`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rpcPgpKeyIdPost(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rpcPgpKeyIdPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const RpcPgpKeyIdPostPreferEnum = { + ParamssingleObject: 'params=single-object' +} as const; +export type RpcPgpKeyIdPostPreferEnum = typeof RpcPgpKeyIdPostPreferEnum[keyof typeof RpcPgpKeyIdPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts new file mode 100644 index 000000000..9e4f193fc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceEndpoints, +} from '../models/index'; +import { + ServiceEndpointsFromJSON, + ServiceEndpointsToJSON, +} from '../models/index'; + +export interface ServiceEndpointsDeleteRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsDeletePreferEnum; +} + +export interface ServiceEndpointsGetRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceEndpointsGetPreferEnum; +} + +export interface ServiceEndpointsPatchRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsPatchPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +export interface ServiceEndpointsPostRequest { + select?: string; + prefer?: ServiceEndpointsPostPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +/** + * + */ +export class ServiceEndpointsApi extends runtime.BaseAPI { + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceEndpointsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; +/** + * @export + */ +export const ServiceEndpointsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts new file mode 100644 index 000000000..1a5f43ac7 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceFallbacks, +} from '../models/index'; +import { + ServiceFallbacksFromJSON, + ServiceFallbacksToJSON, +} from '../models/index'; + +export interface ServiceFallbacksDeleteRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksDeletePreferEnum; +} + +export interface ServiceFallbacksGetRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceFallbacksGetPreferEnum; +} + +export interface ServiceFallbacksPatchRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksPatchPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +export interface ServiceFallbacksPostRequest { + select?: string; + prefer?: ServiceFallbacksPostPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +/** + * + */ +export class ServiceFallbacksApi extends runtime.BaseAPI { + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceFallbacksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; +/** + * @export + */ +export const ServiceFallbacksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts new file mode 100644 index 000000000..36471e815 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServicesApi.ts @@ -0,0 +1,532 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Services, +} from '../models/index'; +import { + ServicesFromJSON, + ServicesToJSON, +} from '../models/index'; + +export interface ServicesDeleteRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesDeletePreferEnum; +} + +export interface ServicesGetRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServicesGetPreferEnum; +} + +export interface ServicesPatchRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesPatchPreferEnum; + services?: Services; +} + +export interface ServicesPostRequest { + select?: string; + prefer?: ServicesPostPreferEnum; + services?: Services; +} + +/** + * + */ +export class ServicesApi extends runtime.BaseAPI { + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.servicesGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServicesDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; +/** + * @export + */ +export const ServicesGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; +/** + * @export + */ +export const ServicesPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; +/** + * @export + */ +export const ServicesPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts new file mode 100644 index 000000000..9d9f59f95 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -0,0 +1,19 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './IntrospectionApi'; +export * from './NetworksApi'; +export * from './OrganizationsApi'; +export * from './PortalAccountRbacApi'; +export * from './PortalAccountsApi'; +export * from './PortalApplicationRbacApi'; +export * from './PortalApplicationsApi'; +export * from './PortalPlansApi'; +export * from './RpcArmorApi'; +export * from './RpcDearmorApi'; +export * from './RpcGenRandomUuidApi'; +export * from './RpcGenSaltApi'; +export * from './RpcPgpArmorHeadersApi'; +export * from './RpcPgpKeyIdApi'; +export * from './ServiceEndpointsApi'; +export * from './ServiceFallbacksApi'; +export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts new file mode 100644 index 000000000..bebe8bbbe --- /dev/null +++ b/portal-db/sdk/typescript/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts new file mode 100644 index 000000000..8ff34b54a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Networks.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + * @export + * @interface Networks + */ +export interface Networks { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Networks + */ + networkId: string; +} + +/** + * Check if a given object implements the Networks interface. + */ +export function instanceOfNetworks(value: object): value is Networks { + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function NetworksFromJSON(json: any): Networks { + return NetworksFromJSONTyped(json, false); +} + +export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { + if (json == null) { + return json; + } + return { + + 'networkId': json['network_id'], + }; +} + +export function NetworksToJSON(json: any): Networks { + return NetworksToJSONTyped(json, false); +} + +export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'network_id': value['networkId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts new file mode 100644 index 000000000..3c35c6a79 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Organizations.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Companies or customer groups that can be attached to Portal Accounts + * @export + * @interface Organizations + */ +export interface Organizations { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof Organizations + */ + organizationId: number; + /** + * Name of the organization + * @type {string} + * @memberof Organizations + */ + organizationName: string; + /** + * Soft delete timestamp + * @type {string} + * @memberof Organizations + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Organizations interface. + */ +export function instanceOfOrganizations(value: object): value is Organizations { + if (!('organizationId' in value) || value['organizationId'] === undefined) return false; + if (!('organizationName' in value) || value['organizationName'] === undefined) return false; + return true; +} + +export function OrganizationsFromJSON(json: any): Organizations { + return OrganizationsFromJSONTyped(json, false); +} + +export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { + if (json == null) { + return json; + } + return { + + 'organizationId': json['organization_id'], + 'organizationName': json['organization_name'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function OrganizationsToJSON(json: any): Organizations { + return OrganizationsToJSONTyped(json, false); +} + +export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'organization_id': value['organizationId'], + 'organization_name': value['organizationName'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts new file mode 100644 index 000000000..b605719a0 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User roles and permissions for specific portal accounts + * @export + * @interface PortalAccountRbac + */ +export interface PortalAccountRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalAccountRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalAccountRbac + */ + roleName: string; + /** + * + * @type {boolean} + * @memberof PortalAccountRbac + */ + userJoinedAccount?: boolean; +} + +/** + * Check if a given object implements the PortalAccountRbac interface. + */ +export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + if (!('roleName' in value) || value['roleName'] === undefined) return false; + return true; +} + +export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { + return PortalAccountRbacFromJSONTyped(json, false); +} + +export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalAccountId': json['portal_account_id'], + 'portalUserId': json['portal_user_id'], + 'roleName': json['role_name'], + 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], + }; +} + +export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { + return PortalAccountRbacToJSONTyped(json, false); +} + +export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_account_id': value['portalAccountId'], + 'portal_user_id': value['portalUserId'], + 'role_name': value['roleName'], + 'user_joined_account': value['userJoinedAccount'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts new file mode 100644 index 000000000..ee2b80517 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccounts.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Multi-tenant accounts with plans and billing integration + * @export + * @interface PortalAccounts + */ +export interface PortalAccounts { + /** + * Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalAccounts + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `organizations.organization_id`. + * @type {number} + * @memberof PortalAccounts + */ + organizationId?: number; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalAccounts + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + userAccountName?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + internalAccountName?: string; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + billingType?: string; + /** + * Stripe subscription identifier for billing + * @type {string} + * @memberof PortalAccounts + */ + stripeSubscriptionId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpAccountId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalAccountsPortalAccountUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalAccounts interface. + */ +export function instanceOfPortalAccounts(value: object): value is PortalAccounts { + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalAccountsFromJSON(json: any): PortalAccounts { + return PortalAccountsFromJSONTyped(json, false); +} + +export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'], + 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], + 'portalPlanType': json['portal_plan_type'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], + 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], + 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalAccountsToJSON(json: any): PortalAccounts { + return PortalAccountsToJSONTyped(json, false); +} + +export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'organization_id': value['organizationId'], + 'portal_plan_type': value['portalPlanType'], + 'user_account_name': value['userAccountName'], + 'internal_account_name': value['internalAccountName'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], + 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], + 'billing_type': value['billingType'], + 'stripe_subscription_id': value['stripeSubscriptionId'], + 'gcp_account_id': value['gcpAccountId'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts new file mode 100644 index 000000000..5216b4f8a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User access controls for specific applications + * @export + * @interface PortalApplicationRbac + */ +export interface PortalApplicationRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalApplicationRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_applications.portal_application_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the PortalApplicationRbac interface. + */ +export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + return true; +} + +export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacFromJSONTyped(json, false); +} + +export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalApplicationId': json['portal_application_id'], + 'portalUserId': json['portal_user_id'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacToJSONTyped(json, false); +} + +export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_application_id': value['portalApplicationId'], + 'portal_user_id': value['portalUserId'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts new file mode 100644 index 000000000..08c5953bc --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplications.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Applications created within portal accounts with their own rate limits and settings + * @export + * @interface PortalApplications + */ +export interface PortalApplications { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalApplications + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalApplications + */ + portalAccountId: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationName?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + emoji?: string; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationDescription?: string; + /** + * + * @type {Array} + * @memberof PortalApplications + */ + favoriteServiceIds?: Array; + /** + * Hashed secret key for application authentication + * @type {string} + * @memberof PortalApplications + */ + secretKeyHash?: string; + /** + * + * @type {boolean} + * @memberof PortalApplications + */ + secretKeyRequired?: boolean; + /** + * + * @type {string} + * @memberof PortalApplications + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalApplications interface. + */ +export function instanceOfPortalApplications(value: object): value is PortalApplications { + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + return true; +} + +export function PortalApplicationsFromJSON(json: any): PortalApplications { + return PortalApplicationsFromJSONTyped(json, false); +} + +export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { + if (json == null) { + return json; + } + return { + + 'portalApplicationId': json['portal_application_id'], + 'portalAccountId': json['portal_account_id'], + 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], + 'emoji': json['emoji'] == null ? undefined : json['emoji'], + 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], + 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], + 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], + 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], + 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], + 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], + 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationsToJSON(json: any): PortalApplications { + return PortalApplicationsToJSONTyped(json, false); +} + +export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_application_id': value['portalApplicationId'], + 'portal_account_id': value['portalAccountId'], + 'portal_application_name': value['portalApplicationName'], + 'emoji': value['emoji'], + 'portal_application_user_limit': value['portalApplicationUserLimit'], + 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], + 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], + 'portal_application_description': value['portalApplicationDescription'], + 'favorite_service_ids': value['favoriteServiceIds'], + 'secret_key_hash': value['secretKeyHash'], + 'secret_key_required': value['secretKeyRequired'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts new file mode 100644 index 000000000..d89b2b209 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalPlans.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available subscription plans for Portal Accounts + * @export + * @interface PortalPlans + */ +export interface PortalPlans { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalPlans + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalPlans + */ + portalPlanTypeDescription?: string; + /** + * Maximum usage allowed within the interval + * @type {number} + * @memberof PortalPlans + */ + planUsageLimit?: number; + /** + * + * @type {string} + * @memberof PortalPlans + */ + planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; + /** + * Rate limit in requests per second + * @type {number} + * @memberof PortalPlans + */ + planRateLimitRps?: number; + /** + * + * @type {number} + * @memberof PortalPlans + */ + planApplicationLimit?: number; +} + + +/** + * @export + */ +export const PortalPlansPlanUsageLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalPlans interface. + */ +export function instanceOfPortalPlans(value: object): value is PortalPlans { + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalPlansFromJSON(json: any): PortalPlans { + return PortalPlansFromJSONTyped(json, false); +} + +export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { + if (json == null) { + return json; + } + return { + + 'portalPlanType': json['portal_plan_type'], + 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], + 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], + 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], + 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], + 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], + }; +} + +export function PortalPlansToJSON(json: any): PortalPlans { + return PortalPlansToJSONTyped(json, false); +} + +export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_plan_type': value['portalPlanType'], + 'portal_plan_type_description': value['portalPlanTypeDescription'], + 'plan_usage_limit': value['planUsageLimit'], + 'plan_usage_limit_interval': value['planUsageLimitInterval'], + 'plan_rate_limit_rps': value['planRateLimitRps'], + 'plan_application_limit': value['planApplicationLimit'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts new file mode 100644 index 000000000..8ad6bc8bf --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RpcArmorPostRequest + */ +export interface RpcArmorPostRequest { + /** + * + * @type {string} + * @memberof RpcArmorPostRequest + */ + : string; +} + +/** + * Check if a given object implements the RpcArmorPostRequest interface. + */ +export function instanceOfRpcArmorPostRequest(value: object): value is RpcArmorPostRequest { + if (!('' in value) || value[''] === undefined) return false; + return true; +} + +export function RpcArmorPostRequestFromJSON(json: any): RpcArmorPostRequest { + return RpcArmorPostRequestFromJSONTyped(json, false); +} + +export function RpcArmorPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcArmorPostRequest { + if (json == null) { + return json; + } + return { + + '': json[''], + }; +} + +export function RpcArmorPostRequestToJSON(json: any): RpcArmorPostRequest { + return RpcArmorPostRequestToJSONTyped(json, false); +} + +export function RpcArmorPostRequestToJSONTyped(value?: RpcArmorPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + '': value[''], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts new file mode 100644 index 000000000..d09a9f460 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RpcGenSaltPostRequest + */ +export interface RpcGenSaltPostRequest { + /** + * + * @type {string} + * @memberof RpcGenSaltPostRequest + */ + : string; +} + +/** + * Check if a given object implements the RpcGenSaltPostRequest interface. + */ +export function instanceOfRpcGenSaltPostRequest(value: object): value is RpcGenSaltPostRequest { + if (!('' in value) || value[''] === undefined) return false; + return true; +} + +export function RpcGenSaltPostRequestFromJSON(json: any): RpcGenSaltPostRequest { + return RpcGenSaltPostRequestFromJSONTyped(json, false); +} + +export function RpcGenSaltPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcGenSaltPostRequest { + if (json == null) { + return json; + } + return { + + '': json[''], + }; +} + +export function RpcGenSaltPostRequestToJSON(json: any): RpcGenSaltPostRequest { + return RpcGenSaltPostRequestToJSONTyped(json, false); +} + +export function RpcGenSaltPostRequestToJSONTyped(value?: RpcGenSaltPostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + '': value[''], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts new file mode 100644 index 000000000..516acad4a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available endpoint types for each service + * @export + * @interface ServiceEndpoints + */ +export interface ServiceEndpoints { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceEndpoints + */ + endpointId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceEndpoints + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + endpointType?: ServiceEndpointsEndpointTypeEnum; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const ServiceEndpointsEndpointTypeEnum = { + CometBft: 'cometBFT', + Cosmos: 'cosmos', + Rest: 'REST', + JsonRpc: 'JSON-RPC', + Wss: 'WSS', + GRpc: 'gRPC' +} as const; +export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; + + +/** + * Check if a given object implements the ServiceEndpoints interface. + */ +export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { + if (!('endpointId' in value) || value['endpointId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + return true; +} + +export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { + return ServiceEndpointsFromJSONTyped(json, false); +} + +export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { + if (json == null) { + return json; + } + return { + + 'endpointId': json['endpoint_id'], + 'serviceId': json['service_id'], + 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { + return ServiceEndpointsToJSONTyped(json, false); +} + +export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'endpoint_id': value['endpointId'], + 'service_id': value['serviceId'], + 'endpoint_type': value['endpointType'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts new file mode 100644 index 000000000..a10559ad2 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Fallback URLs for services when primary endpoints fail + * @export + * @interface ServiceFallbacks + */ +export interface ServiceFallbacks { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceFallbacks + */ + serviceFallbackId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceFallbacks + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + fallbackUrl: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the ServiceFallbacks interface. + */ +export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { + if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; + return true; +} + +export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { + return ServiceFallbacksFromJSONTyped(json, false); +} + +export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { + if (json == null) { + return json; + } + return { + + 'serviceFallbackId': json['service_fallback_id'], + 'serviceId': json['service_id'], + 'fallbackUrl': json['fallback_url'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { + return ServiceFallbacksToJSONTyped(json, false); +} + +export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_fallback_id': value['serviceFallbackId'], + 'service_id': value['serviceId'], + 'fallback_url': value['fallbackUrl'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts new file mode 100644 index 000000000..766a36099 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Services.ts @@ -0,0 +1,206 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain services from the Pocket Network + * @export + * @interface Services + */ +export interface Services { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Services + */ + serviceId: string; + /** + * + * @type {string} + * @memberof Services + */ + serviceName: string; + /** + * Cost in compute units for each relay + * @type {number} + * @memberof Services + */ + computeUnitsPerRelay?: number; + /** + * Valid domains for this service + * @type {Array} + * @memberof Services + */ + serviceDomains: Array; + /** + * + * @type {string} + * @memberof Services + */ + serviceOwnerAddress?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Services + */ + networkId?: string; + /** + * + * @type {boolean} + * @memberof Services + */ + active?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + beta?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + comingSoon?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + qualityFallbackEnabled?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + hardFallbackEnabled?: boolean; + /** + * + * @type {string} + * @memberof Services + */ + svgIcon?: string; + /** + * + * @type {string} + * @memberof Services + */ + publicEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusQuery?: string; + /** + * + * @type {string} + * @memberof Services + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Services interface. + */ +export function instanceOfServices(value: object): value is Services { + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('serviceName' in value) || value['serviceName'] === undefined) return false; + if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; + return true; +} + +export function ServicesFromJSON(json: any): Services { + return ServicesFromJSONTyped(json, false); +} + +export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { + if (json == null) { + return json; + } + return { + + 'serviceId': json['service_id'], + 'serviceName': json['service_name'], + 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], + 'serviceDomains': json['service_domains'], + 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], + 'networkId': json['network_id'] == null ? undefined : json['network_id'], + 'active': json['active'] == null ? undefined : json['active'], + 'beta': json['beta'] == null ? undefined : json['beta'], + 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], + 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], + 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], + 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], + 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], + 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], + 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServicesToJSON(json: any): Services { + return ServicesToJSONTyped(json, false); +} + +export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_id': value['serviceId'], + 'service_name': value['serviceName'], + 'compute_units_per_relay': value['computeUnitsPerRelay'], + 'service_domains': value['serviceDomains'], + 'service_owner_address': value['serviceOwnerAddress'], + 'network_id': value['networkId'], + 'active': value['active'], + 'beta': value['beta'], + 'coming_soon': value['comingSoon'], + 'quality_fallback_enabled': value['qualityFallbackEnabled'], + 'hard_fallback_enabled': value['hardFallbackEnabled'], + 'svg_icon': value['svgIcon'], + 'public_endpoint_url': value['publicEndpointUrl'], + 'status_endpoint_url': value['statusEndpointUrl'], + 'status_query': value['statusQuery'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts new file mode 100644 index 000000000..316dd6fee --- /dev/null +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './Networks'; +export * from './Organizations'; +export * from './PortalAccountRbac'; +export * from './PortalAccounts'; +export * from './PortalApplicationRbac'; +export * from './PortalApplications'; +export * from './PortalPlans'; +export * from './RpcArmorPostRequest'; +export * from './RpcGenSaltPostRequest'; +export * from './ServiceEndpoints'; +export * from './ServiceFallbacks'; +export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts new file mode 100644 index 000000000..f4d9fba5c --- /dev/null +++ b/portal-db/sdk/typescript/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json new file mode 100644 index 000000000..4567ec198 --- /dev/null +++ b/portal-db/sdk/typescript/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} From 6d693b64d1b90c86964e5c1df0a5932166d1b536 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 7 Oct 2025 15:15:29 +0100 Subject: [PATCH 33/43] fix ts readme --- portal-db/sdk/typescript/README.md | 106 +++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 4e066a339..b95617b40 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1,46 +1,96 @@ -## @grove/portal-db-sdk@12.0.2 (a4e00ff) +# TypeScript SDK for Portal DB -This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: +Auto-generated TypeScript client for the Portal Database API. -Environment -* Node.js -* Webpack -* Browserify +## Installation -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 +```bash +npm install @grove/portal-db-sdk +``` -Module system -* CommonJS -* ES6 module system +> **TODO**: Publish this package to npm registry -It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) +## Quick Start -### Building +Built-in client methods (auto-generated): -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build +```typescript +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; + +// Create client +const config = new Configuration({ + basePath: "http://localhost:3000" +}); +const client = new PortalApplicationsApi(config); + +// Use built-in methods - no manual paths needed! +const applications = await client.portalApplicationsGet(); ``` -### Publishing +React integration: -First build the package then run `npm publish` +```typescript +import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; +import { useState, useEffect } from "react"; -### Consuming +const config = new Configuration({ basePath: "http://localhost:3000" }); +const portalAppsClient = new PortalApplicationsApi(config); +const createAppClient = new RpcCreatePortalApplicationApi(config); -navigate to the folder of your consuming project and run one of the following commands. +function PortalApplicationsList() { + const [applications, setApplications] = useState([]); + const [loading, setLoading] = useState(true); -_published:_ + useEffect(() => { + portalAppsClient.portalApplicationsGet().then((apps) => { + setApplications(apps); + setLoading(false); + }); + }, []); -``` -npm install @grove/portal-db-sdk@12.0.2 (a4e00ff) --save -``` + const createApp = async () => { + await createAppClient.rpcCreatePortalApplicationPost({ + rpcCreatePortalApplicationPostRequest: { + pPortalAccountId: "account-123", + pPortalUserId: "user-456", + pPortalApplicationName: "My App", + pEmoji: "๐Ÿš€" + } + }); + // Refresh list + const apps = await portalAppsClient.portalApplicationsGet(); + setApplications(apps); + }; -_unPublished (not recommended):_ + if (loading) return "Loading..."; + return ( +
+ +
    + {applications.map(app => ( +
  • + {app.emoji} {app.portalApplicationName} +
  • + ))} +
+
+ ); +} ``` -npm install PATH_TO_GENERATED_PACKAGE --save + +## Authentication + +Add JWT tokens to your requests: + +```typescript +import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; + +// With JWT auth +const config = new Configuration({ + basePath: "http://localhost:3000", + accessToken: jwtToken +}); + +const client = new PortalApplicationsApi(config); ``` From 8d2933538907b147d9b0570e67716d695493da49 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Tue, 7 Oct 2025 19:01:50 +0100 Subject: [PATCH 34/43] add SQL for aux services --- portal-db/api/openapi/openapi.json | 217 +++++++ portal-db/docker-compose.yml | 2 + portal-db/schema/003_aux_services_queries.sql | 35 ++ portal-db/sdk/go/client.go | 530 +++++++++++++++--- portal-db/sdk/go/models.go | 88 ++- .../sdk/typescript/.openapi-generator/FILES | 3 +- portal-db/sdk/typescript/README.md | 106 +--- .../src/apis/PortalWorkersAccountDataApi.ts | 152 +++++ portal-db/sdk/typescript/src/apis/index.ts | 1 + .../src/models/PortalWorkersAccountData.ts | 124 ++++ portal-db/sdk/typescript/src/models/index.ts | 1 + 11 files changed, 1094 insertions(+), 165 deletions(-) create mode 100644 portal-db/schema/003_aux_services_queries.sql create mode 100644 portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index 723bb88d8..580f3954b 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -1680,6 +1680,103 @@ ] } }, + "/portal_workers_account_data": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_email" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_user_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", + "tags": [ + "portal_workers_account_data" + ] + } + }, "/portal_account_rbac": { "get": { "parameters": [ @@ -3047,6 +3144,78 @@ "format": "character varying" } }, + "rowFilter.portal_workers_account_data.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.user_account_name": { + "name": "user_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.billing_type": { + "name": "billing_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.portal_account_user_limit": { + "name": "portal_account_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_workers_account_data.gcp_entitlement_id": { + "name": "gcp_entitlement_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.owner_email": { + "name": "owner_email", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.owner_user_id": { + "name": "owner_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, "rowFilter.portal_account_rbac.id": { "name": "id", "required": false, @@ -3962,6 +4131,54 @@ }, "type": "object" }, + "portal_workers_account_data": { + "description": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", + "properties": { + "portal_account_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "user_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_plan_type": { + "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "billing_type": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "portal_account_user_limit": { + "format": "integer", + "type": "integer" + }, + "gcp_entitlement_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "owner_email": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "owner_user_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + } + }, + "type": "object" + }, "portal_account_rbac": { "description": "User roles and permissions for specific portal accounts", "required": [ diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 97235b11f..7059462e8 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -48,6 +48,8 @@ services: - ./schema/001_portal_init.sql:/docker-entrypoint-initdb.d/001_portal_init.sql:ro # 002_postgrest_init.sql: PostgREST API setup (roles, permissions, JWT) - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro + # 003_aux_services_queries.sql: Auxiliary services queries + - ./schema/003_aux_services_queries.sql:/docker-entrypoint-initdb.d/003_aux_services_queries.sql:ro # 2. LOCAL DEV ONLY: mount set_authenticator_password.sql: Set authenticator password # - Required to set the authenticator role's password to 'authenticator_password' for the local development environment. diff --git a/portal-db/schema/003_aux_services_queries.sql b/portal-db/schema/003_aux_services_queries.sql new file mode 100644 index 000000000..867fccb3e --- /dev/null +++ b/portal-db/schema/003_aux_services_queries.sql @@ -0,0 +1,35 @@ +-- ============================================================================ +-- Auxiliary Services Queries +-- ============================================================================ +-- This file contains custom views to support auxiliary services +-- like portal-workers, notifications, billing, etc. + +-- ============================================================================ +-- PORTAL WORKERS ACCOUNT DATA VIEW +-- ============================================================================ + +-- View to get account data needed by portal-workers for billing operations +-- Returns accounts with owner email - generates proper types in SDK +-- Use WHERE clauses to filter by portal_plan_type and/or billing_type +CREATE VIEW portal_workers_account_data AS +SELECT + pa.portal_account_id, + pa.user_account_name, + pa.portal_plan_type, + pa.billing_type, + pa.portal_account_user_limit, + pa.gcp_entitlement_id, + pu.portal_user_email as owner_email, + pu.portal_user_id as owner_user_id +FROM portal_accounts pa +INNER JOIN portal_account_rbac par ON pa.portal_account_id = par.portal_account_id +INNER JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id +WHERE + pa.deleted_at IS NULL + AND pu.deleted_at IS NULL + AND par.role_name = 'OWNER'; + +-- Grant select permissions to both reader and admin roles +GRANT SELECT ON portal_workers_account_data TO portal_db_reader, portal_db_admin; + +COMMENT ON VIEW portal_workers_account_data IS 'Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = ''PLAN_UNLIMITED'' AND billing_type = ''stripe'''; diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go index e4570cd62..6a213fcc6 100644 --- a/portal-db/sdk/go/client.go +++ b/portal-db/sdk/go/client.go @@ -264,6 +264,9 @@ type ClientInterface interface { PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetPortalWorkersAccountData request + GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetRpcArmor request GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1261,6 +1264,18 @@ func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStripp return c.Client.Do(req) } +func (c *Client) GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalWorkersAccountDataRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetRpcArmorRequest(c.Server, params) if err != nil { @@ -7004,6 +7019,268 @@ func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansPar return req, nil } +// NewGetPortalWorkersAccountDataRequest generates requests for GetPortalWorkersAccountData +func NewGetPortalWorkersAccountDataRequest(server string, params *GetPortalWorkersAccountDataParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_workers_account_data") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OwnerEmail != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_email", runtime.ParamLocationQuery, *params.OwnerEmail); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OwnerUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_user_id", runtime.ParamLocationQuery, *params.OwnerUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + // NewGetRpcArmorRequest generates requests for GetRpcArmor func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { var err error @@ -10368,6 +10645,9 @@ type ClientWithResponsesInterface interface { PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + // GetPortalWorkersAccountDataWithResponse request + GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) + // GetRpcArmorWithResponse request GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) @@ -11143,6 +11423,30 @@ func (r PostPortalPlansResponse) StatusCode() int { return 0 } +type GetPortalWorkersAccountDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalWorkersAccountData + ApplicationvndPgrstObjectJSON200 *[]PortalWorkersAccountData + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalWorkersAccountData +} + +// Status returns HTTPResponse.Status +func (r GetPortalWorkersAccountDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalWorkersAccountDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetRpcArmorResponse struct { Body []byte HTTPResponse *http.Response @@ -12253,6 +12557,15 @@ func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJS return ParsePostPortalPlansResponse(rsp) } +// GetPortalWorkersAccountDataWithResponse request returning *GetPortalWorkersAccountDataResponse +func (c *ClientWithResponses) GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) { + rsp, err := c.GetPortalWorkersAccountData(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalWorkersAccountDataResponse(rsp) +} + // GetRpcArmorWithResponse request returning *GetRpcArmorResponse func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) @@ -13410,6 +13723,49 @@ func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, return response, nil } +// ParseGetPortalWorkersAccountDataResponse parses an HTTP response from a GetPortalWorkersAccountDataWithResponse call +func ParseGetPortalWorkersAccountDataResponse(rsp *http.Response) (*GetPortalWorkersAccountDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalWorkersAccountDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + // ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -13878,91 +14234,95 @@ func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w9a3PcNpJ/BcW7Kjt145HiPKpOV/7gdZJdXxJHJdl3HxLXLERiZhCRAA2AkrUp/fct", - "kMMXCJIgAXLGNr8k1rDZ3UC/m3j85fk0iilBRHDv4i8vhgxGSCCW/hXiCAv5jwBxn+FYYEq8C+8X+TMm", - "OwBJAC7hDhOYPll5WD7+kCD24K08AiPkXRyQrDzu71EEJTbxEMsHXDBMdt7j48qj2y1H1pQOWHpIsQCx", - "JqXf5M8SpgV1+lY35pihLWKvaEI0I7lMHyLio5zCHsEM54FEBlGjgUgSeRe/e77E+YJQgrz3q1bKl1J2", - "3DHpVCH4C47JLkTP6M2fyBedTFDuevQMiYSRFwzFDHFERK4Ch98jTHAEw/KHdJ7kX5yGiYR9gXeEMvQs", - "SOIQ+1AgXn8cIbarPe0Y31VK4xRGqGWSQbJDg+1IZfUqxdKt7Smld2SEf9BSe5aiqpIM0BYmofAuPCxQ", - "JEWmYYLe/4RDgdiaIHFP2S3P/7HBgUSis+UKRJXelrIISnL+HjLoC8TAHWQPmU/oIk3ZDhL8r3SMfO0z", - "BAUKNlC00a9AaOkLHCEuYBSDeyz2QP4J/pXptDkbAQpRyUZdPtd0K0AGAApiLY6vgmc6Zqt/dQhOBdMy", - "hIlAu1S9RtLPiKlz9gZGCNAtEHsEquCt8ULFOIGqJXHQo2oVCJfSiykTMNxAPw1MG3YD/XW72OwkpaOl", - "/NZOugnoRAwdPCUcsX6GcqjJuGE0RIUm6xgpASbjIR3knxQTqYDZg1Y91YBq+bqhNESQDOKGr29wGGKy", - "22Tv6FmowUwwJ0eMDCoj9dgwo9dXGdn5sYERK1CTyEbSQERgEaII9XKjQE7CkfSOjFRsqsua9cCT8DV/", - "rFY50Hr/erR+R/CHBAEcSEltMWJgS1kau7OXQelkjhY2GgNJnWBRchvwVXlhuuktiWxSLbuD4WD2yje1", - "fMbJTYj9dRxCUoV0wzSL+XB+5UvupzQdYFcMasBNonYSKEYbntwUJqM1ousUDlThVIs6BM0WM2ohNMmg", - "TiQX5lnWY+Kzm4BOJybOuhlyztNs7OjZh8rQ1AWDSk/ze3/hUAeeVEDHLyBUjo5uUyVD/JT09wQy6Coz", - "KKJ/4jY+socTqQlfb+EdZVigDUfsDvtog4PWcKuFNePs9/cjeDuVLoGOp4qp1YKusTeqvjUntyfiMrW8", - "dUXbNvA5+TNP8PUvOQ2KPRwaJ/s9b7tO+M0HYJD4t7/oeKo58hkSm1v0sNlDvm/m2v+AfI8CkMGBW/SQ", - "ptcVHAAmYi9zb7+r7azSmUy7K4QY+pBghlr9gg7UQW+vys2xExWpyDxT56pOdZu6Htpe8SrMMChQ3Rrq", - "WncFBQLpc4AJkNJBXHAQIyY1kZKgrT+iQe6U8YTDHdq0LD/4FX7EURKBFAjAMKT3KEjlhkna46m4lFbu", - "qxSmYr3fh7a+4NhtHvg7hTaEnpUBWZD+HScs5okpIkFM8VF79k1W8n91pGBVEAul7qDdpTZ1oC4NViGH", - "MVOWD+0hp4CYSC+OFnFyVrYwDG+gf3sCKlqykv9rk7CwvQqswDiVTsmH+ouBqlRBHZhOk5f5tbXk4dja", - "ytfQF/iu1XMcnlpkhQWhGyRg6yde+cwFEZ9GmOw2nLYHqyqII5JxItAmIVjwTYzYhqEQPjSzo1eUp9nc", - "4QWQvpBWEwj6e5C9tWrjWUvD3h6O76WO2LMrONhDFpSOBhF4E7aXTXpgF6o0/wq5gnQW/4s42hUndKBu", - "mfmQwBCLB2OJtMK7EErutAMaQUw0tdr/wRAH4PD48Dkbc3B4r7UfUMfqqNva4Hr24FaS7mr61WCmIU/v", - "CWIbGAQMcd7HRx3YMUMCioQbmZYOdBJmMrrdXOS/6vwt+iiMKd7tNthvj8fFc2tKMydTHIXI13RBMrYw", - "2YFXNEyi1Lj1upe+37WYW44z6/38jQYYpWr8ku3S//uUCJQt3Ks0q87+5NlUl0hjRmPExOH1uit8EAjq", - "p7foHf7uVRa0H7YZSIgq0TsSrOMd42KdAfzX6XDxPyQJQ/4iXfEQZyFkcqak0p75/G4GYjUQwRL0uEo1", - "5LkrFWk3wBk1ZEomxiqIBU+D9WM0LZ165BsyBmnIfzK09S68/zgrd6WdZU/5WYFwhNDd4e2UozEZvWgM", - "X39cKaGgfLaqrbt0N/d1rI4FMAL5aCk0aQ0XhYqjIQ8FYOVpVsc7E40Ot2MBjSYxWkxtFIcLS4+pITIt", - "mCo4PpHQ+LQC47MKizsRFO8XUs2ylKVrzgWl4p9IYKPIWAtOR3W8AJvYWgXZANUJlE8oTD69IPnsQuTO", - "BMjNhFe1xPTzrmuJZUinEdUA3LYyKkmNFk6Ook0qh+crr/HJ0plMmpgdC2YkgdHS0dMbLiIdnoacNECr", - "xkdI98IqMU8krIEErIVVpzdeWFU8rcKqABXCci6jqUQzk0QsBdE1/xnqwwsSX7W3oOxZSmLpCVEAbkLq", - "3/p7iAnIwcHTS+rfIgEiiAlBYgUE4iL9BxL++itvpXRH6l/KlAMBqEAXf5C3e8wB5gCCS4YjyB7Az+hh", - "/Udyfv6NH9+epf9A3qq7px7Bj78gshN77+Lb530NmApTzVaMpgGgfh6OYkgw4oAy4Cdc0AgxsGM0iTkQ", - "eyiADwm4QQAKAf09CoCg4DLbNPkyT7zVeap/3C0P7nj17urqxzdvN29f//rj9duXv15WJ8K8C77yxpxm", - "MYqQZnerG7E3PpfnP6hEBx8/YapZ3/+3Zrz1jxnOJaeobnNTcHPoOp1u6Z8oe345YoDREPH03JkYsQhz", - "Lq0g/VrKY+TjLfaVHcBNZZ5L6gbbmBtkf6IM4R2RZKVd/rN3a/Q/D9xtb4GANyF68UR55Qnw089H6oMN", - "Dp4M917ffK/RsebGtnGjlAi4sk2udXwpcGNwh7dcjax2yoYppufnOjvUn5VRGOQWhhwV7+VrC1T7Sk1K", - "t5upsWuw5Lzf3jRR5NckFPiZQAQSUVhS5g3SCiS1wMPm4HQ59o7l7qpubOrJHFaTOHMYGoWieeSF8ZC/", - "+64FX/PgCjucrUdPWCQxY0Kr6gc6D41qeoIaeOkKlPeeuHHbua7tENkwSAIabZIEB09lUjnubIo/yB9k", - "oiSzy03rT6MYMzUtm8nyQ++CdGVhRInYeyvvAUEmfdHAzQ4rr/fkhyGs17ZGjItS+v0NrXEqBW/EqeK9", - "J04qiJU3yZkPdl5m4tRz5WlPYnBXh3XE2VKNuqKr5puFJqOFvo84Bz4lgtFQyWVrTdjZq7K5M+XGNuSR", - "2XLvFuf2rLnyajNzruFYsue+kc1be9ZyY3WPujLJZlaryYtfVp6Cg/3lOxOVuvPA/x5hBug9AazYi5ll", - "zxwJgcnu6M2WUSiKIylMFeRrnYK0HS7Rs3I5Oy62uc6xoAAZgw9fYgneceyEXSzv8NDmifExkl3N6RFW", - "eVbvqQ9jA968yXTniQpGQ5jixAM7HW05sqCvxTJ3nOoJURVf1RGliq/wSni6gziUPqie4GctGzn9fY3+", - "9iMOzPTa1aEE5tScnSQwiuQMtjqkZJ3sE9XK69vQb4783NBCuoss7fqHNmvIgYBEU9ksWW6umjkFU/b6", - "T19iNTb4l1dPREj87ae33srzKY+o9AlXP17Lv//3+rc3z64uX3kr7/+vr72Vt5N/aFS5Z7v/yqtvIxuY", - "gGk2ozVTrhyozLVKaFc9lnnjhHLWQzmDXdZQW2Ci7Cc6PALvrn45dBkOcwbu94iA+KBkhUGBLcTh/Kah", - "njFgmxRoTwqY3uAWlR+u8i1nNVR3mNa0o8MSTJeOFDawZTRKU4LDEpI32SqMhv6XBx30J5b5WQX9kMqB", - "A0YvOD0uwEinP4XOROse/P45HbQaSDVZzf00TZPNgUqTLaFdmWzLFnzzRo1uGUnXVvr+ibXf++6sIzTI", - "LU+YTqu72+3E07pZ3RTtd+fab0raHeeWrCo7x3s2J6686sbvXuDjxKtamMrPIlB0Xr+rEn3MvsT/QH3d", - "xW6Ui51MxsEP1E+iysVhqSi8vRAxvzg7iyUcQ1ysKdudIXJ29/Xz9fkZjPF6L6Iw++S/pamBYBEeNueT", - "ALIAZO4CHNZyrrw7xHhGXeJYPwdP4bfo/Hy7/Sr9xh8jAmPsXXjfrM/X5zI6QrFPWT+T/9lll/zJgJmy", - "+jrwLry/p3f2McRjSngWRZ+fn2uu6Ps5WweaRNLq5A8xIi8vX4MKGHiaeobgMB9fSRnBHZfSeE0EozxG", - "foruvUR1Vl9IKoNLk70f0t/f5JCr2h2Jv+sXt5YgZ91XlD2uehHU7p17fN+YqW91ngq8OqxMrs+Y7fLY", - "fC6LeXv/uGoV6vGm7HDmgQFkdq+jAWB2sZ4pYHqZnQn57MZKA8isg2WsLtktlBptOR+0bL0InGZbk9V4", - "Onw9+wwEOxe629PXr4C3xdtYGi+d4cp7fv69JixAJjAM53QBMRT+vukELuXPJ+U581NOHtpkUTsIpSaR", - "U3O78eGmVWXKKR/veM39ZuWyV9cT+7WmSM0Ky+lnVeYEmg0UXYnBbzXw8TrefSOmSeAxvtzSAlmlArfA", - "UmkUWGCpJPMzp1GONtHkCljXuK6UalG2T0PZlgR0zgS0cd7KLFmoA6r2qWg/Exb5aB9yd0np5A61K0Fd", - "nOonG8EHZp0NhT7lHKA9v7dT2PmS/L7pNs70J55rmfW3bjHtyv0zEgcKV/KV8d6j5U71QdZldle6K5T5", - "amlrfOVmRGtUun2UMxcH4/ch5/qp08WuqmBRw89EDZeyYc6yoeXMv1mKB2e07UsIU1YsCgkzEu7Kielc", - "cFcdsbjhzzcbGJj5tij8SWYV7XWGvULPV2uYzbhxxTHVdDdLDT6wzODOvAp36w0sWx4tvJWr/K2wNfeC", - "W6HTn5DhYrya4xemQVvuLZkIP4u5Hera2TBWmFpOP7DCqRzkYo1LOcTFCt/YHp+KZ2yXr2F9R/tSZ3FQ", - "kd6Rc/NKfPHUi6dePPXiqT9fT730q47Xr+JH6lXx0+hT8Wl7VNN+7p4oKzFuTi2ZyZKZLJnJkpl8UTWk", - "VUPRdrXIVB7frHfLP5nGrdUykUkmudqx1Z7YaNC5Ld9z9FlIYWT0pyEVj/7wIZeorT4TqThtfYuK73h9", - "qsFHfaoKq6qmQZdq0crPUSuXmvwYNbnmJrtZa3Mn9N3V6CbsOKjV+8k4XlPi2kMbVOyLl/5CcoeRebPG", - "Bk4tD+mtUix1fP5ipX/Sh600cTvj+pKFjyhXuFN/w6fxEc56kD2cju/PVRFnR2NPwZ9tu88YvWXbz5zO", - "6PZfD4mqXVrj155Sbo1VPT/ZJcLijCJrpLZNwioudwH5mAtOprkBoN3n82GV/uLQF4e+OPTFoX/eDn3p", - "gR23B8aP2P/ip9P74tP3vaZdp3KcZGZQU2xJaJaEZkloloTmi6tQrTuXtktajhQczHvJ/JNqJFutfDmG", - "LCpd5sp1U/3t5csU2Dpq6+/ZHWWYelTWPviAVr2Fyh0quyhXwalcyWWJrXk/2Nw9uOHXnCmqnil0f2dt", - "0eVFl5f2w0m0HzKTnbnvYEHUWcOhnQf7TkMbboctBoe+ur9xsPjrxV9PWF0V5nIiyUtfsTTOHGavktqm", - "1bw8cjansuhhsX8GWURZ1402V7H/MoVpzC6WfGb3G1WvCxIsQauKmy6uH7p5EAhq7hp6P+DOnHw0T1ns", - "fwUy5rsVpJ1/M5nLH/g4qb9kO520h44uF1WATIT1wwHKWlz6q6cspJXz3yuv1iHMIrHnFiIrh5gLTbkt", - "vkd4f0fkKgV+l6R3bY1kQyXaO+MqXbfzbpwmqxeHDU55RyDoTF+b+PSpqObGs7qFPTqUZVW1OAxFv05d", - "S6jTcwjFAEz0Uz+Gk/cIlTHmcot38SZ1E5s9gkE6kk4BXu7iNIL94wB9eoJsjqhXor2DOnnJ6gZdFfEt", - "etj0OvzLXfwzengdnGJ2VRmEiThbxnHqWVZtlFJ+LRfud30PuM5e+bF4Y3xh3qC+rt6PPqiobKKq3ONp", - "ial+E74lsrGfI5uYjrhctqjMcm6AnJrKDdTlJb+5AjY1ratRvyjZJ6lkSw99zh5606TmaqQ7omzfTTdj", - "xKKlbkJgir66rWPt6qovzvVzieADs0etMp9EHtCeb1sr63yNb5PpHdH9tpvbapa/hWF4A/1b8yz/p+IN", - "ex9RUG/8MtrCmyjtMRVMJSy0xWXrKkpMx0v2cxUA765+Oexxzrjj4H6PCIgZlpCFmnKwhTjUaGWpfQaZ", - "/6J4n6TiLQXAMQqA0rLmLgAsKbsrALoZcVAAdBFwVwBM5GwNqoHF4X4ukX5k1lpT8NPLF3orhPEKPH+F", - "0DXXxhXCJBNdKRfMqwQHPsParksEw/fTFSgkYCLQJiFY8E2M2IahULp4K4YCGkFMuCUWek8Q28AgYIiP", - "xUWQuKfsdvwcQ1/gu7Gze4MEHC8YTHYbToeurCwwfEhgiMVDGYkQkdX12InYQxa4wsXvdhvsjx5ZnNyE", - "2C+K/tHRjK+5gCLhDjFln3THoRi7B7DUGbuQfMya+zqJY8oECsBNSP1bfw8xKb37ltEIiD0Cl9S/RQK8", - "yay66dmNKu3FeS/Oe3Hei/P+op330rc6Qt9q9nbVsbtUUzWnpu1JOU1GDDpRS0KyJCRLQrIkJEs16aKv", - "a9vOdev9+5q4n0Dz1qpn63A2U8SI3eXzJM3rwtsLEV+cnYXUh+GecnHxzfn5uff4/vHfAQAA///1LHFX", - "NBABAA==", + "H4sIAAAAAAAC/+w923LctpK/guJulZ3a8UhxLlWrLT/o2M6JN7aikuzNQ+KaA5GYGUQkSAOgFJ2U/n0L", + "vBMESZAAOWObL4k1bHY30I2+EWj87bhhEIUEEc6cs7+dCFIYII5o8pePA8zFPzzEXIojjkPinDlvxc+Y", + "7AAkHriEO0xg8mTlYPH4U4zog7NyCAyQc5YhWTnM3aMACmz8IRIPGKeY7JzHx5UTbrcMGVPKsPSQoh6i", + "TUq/ip8FTAvq5K1uzBFFW0RfhjFRjOQyeYiIi3IKewRTnBmJFKJGA5E4cM5+d1yB8wUJCXI+rlopXwrZ", + "McukE4VgLxgmOx89C2/+RC7vZCJktkdPEY8peUFRRBFDhOcqkP0eYIID6Jc/JPMk/mKhHwvYF3hHQoqe", + "eXHkYxdyxOqPA0R3tacd47tKaBzDCJVMUkh2aPA6klm9SrB0a3tC6QMZYR+U1J4lqKokPbSFsc+dMwdz", + "FAiRKZgI73/CPkd0TRC/D+kty/+xwZ5AolrLFYgqvW1IAyjIuXtIocsRBXeQPqQ2oYt0SHeQ4H8nY2Rr", + "lyLIkbeBvI1+BUJJn+MAMQ6DCNxjvgfiT/DvVKf12fCQj0o26vK5DrccpACgINZi+Cp4pmO2+leH4GQw", + "JUOYcLRL1Gsk/ZSYPGcXMEAg3AK+R6AK3uovZIwTqFoceT2qVoGwKb0opBz6G+gmjmlDb6C7bhebmaRU", + "tKTf2kk3Aa2IoYOnmCHaz1AONRk3NPRRockqRkqAyXhIBvlniIlQwPRBq54qQJV83YShjyAZxA1b32Df", + "x2S3Sd9Rs1CDmWBODugZZEbqvmFGqy8zsnMjjUUsQU0iG0EDEY65jwLUy40EOQlHwjpSUllTXatZDTwJ", + "X/P7apkDpfWve+sPBH+KEcCekNQWIwq2IU18d/oyKI3MwdxGYyCJESxSbg2+Ki9MN70lkU2iZXfQH8xe", + "+aaSzyi+8bG7jnxIqpB2mKYRG86veMn+lCYD7PJBDbhJ1E4ARWjD4ptiySgX0XUCB6pw8orKnGbLMmoh", + "NMmgjiQWZmnUo2Ozm4BWJyZKqxlizpNo7ODRh8zQ1AmDTE/xe3/iUAeeVECHTyBkjg6+pkqG2DHp7xFE", + "0FVmUBD+idv4SB9OpCZsvYV3IcUcbRiid9hFG+y1ulslrB5nv38cwduxVAlUPFWWWs3paluj6ltzcnsk", + "JlPJW5e3bQOfkz/9AF/9klWn2MOhdrDf87btgF9/ABqBf/uLlqeaIZcivrlFD5s9ZPtmrP0zZHvkgRQO", + "3KKHJLyu4AAw5nsRe7tdZWeZzmTaXSFE0acYU9RqF1SgFmp7VW4OHagIRWapOld1qnupq6HNFa/CDIUc", + "1VdDXeuuIEcgeQ4wAUI6iHEGIkSFJobEa6uPKJBbZTxmcIc2LdsP3sG/cBAHIAEC0PfDe+QlcsMkqfFU", + "TEor91UKU7Heb0NbX7BsNjP+jqEMoWZlQBSkfscmi/chvUWUFQGhBzk87DcEJUdHU7NWchfeE0Q3KIC4", + "Vf2rIDPx05Nd14Em5+lIMhQd3g5bnO7i8LDmTMnZoWuAeYKNiBeF+KDfHpus5P/qUPcqiIHydNDu0pc6", + "UJcnliGHMVOWQdpD5wJiIr04WOScs7KFvn8D3dsjUNGSlfxfm5j67dWsCoxV6ZR8yL9oqEoV1MLSafIy", + "v7aWPBxaW9kauhzftVqO7KlBdlsQukEctoaZ4pkNIm4YiHCVhe1BdxXEEsko5mgTE8zZJkJ0Q5EPH5pZ", + "3suQJVlp9gJIXkiqIgi6e5C+tWrjWUnDfD0c3kod8NtDwcEeUq80NIjAG7+9/KMGtqFK8+/0LUin/r/w", + "o11+QgVql5lPMfQxf9CWSCu8DaHkRtsLA4iJoub0f9DHHsgeZ9tyMAPZe611zTpWS1+NGlzP7txK0l1p", + "Qg1mGvJp5gs9jyLG+vioA1tmiEMeM62lpQKdhJmUbjcX+a8qe4v+4toU73Yb7Lb74+K5MaWZgymGfOQq", + "qrkpW5jswMvQj4Nkcat1L3m/61CKGGdaw/5H6GGUqPE53SX/d0PCUboBuVJ0P/mTpVNdIo1oGCHKs9fr", + "pvCBI6ie3uIbyO9O5WBOdlxKQFSJ3hFvHe0o4+sU4L+Oh4v/IbHvsxfJzq0odSGTMyWU9sRldzMQq4Fw", + "GqPHVaIhz22pSPsCnFFDpmRirIIY8DRYP0bTUqlHfrBskIb8J0Vb58z5j5PydO1J+pSdFAhHCN0e3k45", + "apNRi0bz9ceV5ArKZ6va/nF7c1/HalkAI5CPlkKT1nBRyDga8pAAVo7ilI810ahwWxbQaBKjxdRGcbiw", + "1JgaIlOCyYJjEwmNTSswNquwmBVBsX4h1VaWtAXXuqBk/BMJbBQZY8GpqI4XYBNbqyAboCqBsgmFyaYX", + "JJtdiMyaAJme8KorMdmmYltiKdJpRDUAt6mMSlKjhZOjaJNK9nzlND5ZWpNJE7NlwYwkMFo6anrDRaTC", + "05CTAmjV+AhpX1gl5omENZCAsbDq9MYLq4qnVVgVoEJY1mU0lWhmkoihILrmP0WdvSDwVWsL0tnLOBKW", + "EHngxg/dW3cPMQE5OHh6Gbq3iIMAYkIQXwGOGE/+gbi7/sZZSdWR+pcyqbFJyNHZH+T9HjOAGYDgkuIA", + "0gfwC3pY/xGfnn7nRrcnyT+Qs+quqQfwr7eI7PjeOfv+eV8BpsJUsxSjKADIn4eDCBKMGAgpcGPGwwBR", + "sKNhHDHA95ADFxJwgwDkHLp75AEegsv08Pd5HnjL81T/uFs2IHr54erq9cX7zfs3715fvz9/d1mdCP0q", + "+MoZ05VnFCHFKX07Ym98Ls9/kIkObqOjq1k//rdivPWPGdYlJ6lus7lBc+gqnW6pn0i9CxiigIY+Ykn/", + "rAjRADMmVkHytZRFyMVb7EqdDJrKPJfUNdoxNMj+FFKEd0SQFevyX70tHv6Vcbe9BRze+OjFE+mVJ8BN", + "Ph/JDzbYezLcen33o0LHmgd0x41SIGDScd/W8SXAjcFlb9kaWa1bkC6m56eqdaju+VMsyC30GSrey/cW", + "yOsrWVKqPc+N088l5/3rTeFF3sU+x884IpDwYiWl1iDJQJIVmO3qT46V7GhuruqLTT4dYDSJM7uhUSia", + "rXu0h/zDDy34mocZzHC2ttAxCGLGuFbZDnQ2v2taghp4aQqk957YMdu5ru0Q2VBIvDDYxDH2noqgclyP", + "nT/IH2SiILPLTKsPLoyZmpZDsXnzTi/ZWRiEhO+dlfOAIBW2aOChrZXT28FmCOu1MxHjvJT6nFarn0rA", + "G36qeO+JlQxi5UzSu8bMykwceq4c5WkSe3lYh58t1ajLuyq+WSgiWui6iDHghoTT0Jdi2VoRdvasbO5I", + "udFOYWS03NuqoT1qrrzajJxrOJbouW9k8+aetdhY7rUhTbLeqlXExeeVpyBbf/kJaynvzPjfI0xBeE8A", + "Lc6Up9EzQ5xjsjt4sWUUiqK1jq6CfKtSkLYmOT07l9O21819jgUFSCl8+BpT8I72OWa+vMNC6wfGhwh2", + "FV1wjOKs3u41Yx3evMF0Z2cYrSFM0bnFTEdbWq/0lVjm9lM9Lqpiqzq8VPEVXnJPdxD7wgbVA/y0ZCOm", + "v6/Q396qRU+vbTVX0admrSPKKJIzrNUhKetkn6hWTl9jEn3kp5orRCvJUrUZUKyL9CkQT5N1kL79LHu7", + "qGSKpZAFd8mqTs7zgKQRxxqkBzJAzATkbz+/vnoNZE7BC/Dk8u35xebDxds37968f/3qCTi/eAWqVVAB", + "k2brT6atlk5ROZSal9hApp/4zFcbOzJ2xkcYX2y9a4LaT8PEKLdYtTncHAgINJXz2OX5zZmzPKmdyPRV", + "nEYPkfKWrgDxf/z03lk5bsiCUIQdV6+vxd//e/3rxbOry5fOyvnt+tpZOTvxh8Jb9nQUWTn1k6oDVV1x", + "3rWp4DlQqdwltDW1njUUldrJlDP4sWM11PawSUcWs0fgw9XbrJCZzRm43yMCokzJigUFtmmLq5mXhtzG", + "xDTvUDYjmX7BLSo/XOVb2sFUD7HXtKNjJejuTivWwJaGQZJ1ZLvULtKNXg39L3up9OeueTuUfkipp4nW", + "C1Y7kmjp9OdQ/Gxt89E/p4M2HMpLVnGVX3PJ5kDlki2hbS3Zli4f+rVg1U61rm4d/RNr3l7DWtF5kFme", + "MGOXG2iYiae1H4Yu2h9OlZ+tlU0tDFmVmlP0nH9eOdXeEr3Ah/FXNTeVtzuRdF59cBv9lW72eRW6qjtw", + "Q8Z3IhgHr0I3Dip3rCaicPacR+zs5CQScBQxvg7p7gSRk7tvn69PT2CE13se+Omuom2YLBDM/az/B/Eg", + "9UBqLkC2XXzl3CHKUuoCx/o5eAq/R6en2+03SVUgQgRG2Dlzvlufrk+Fd4R8n7B+Iv6zS+9DLko1bzzn", + "zPlncr0xRSwKCUu96PPTU8Vtxr+kW83jQKw68UOEyPnlG1ABA08Ty+Bl8/GNkBHcMSGNN4TTkEXITdB9", + "FKhO6nvVhXNpsvcq+f0ih1zVrpP+Xb1/vgQ56b7N9XHVi6B2Re/jx8ZMfa+yVOBldvihPmOmO/DzuSzm", + "7ePjqlWoh5uyrK2KBmR6BbYGYHoHsS5gcu+vDvn0cm8NyLSCpK0u6YXdCm05HXQypnCcet0PZH86/MjM", + "DAQ7z9KY01cfsjHF2zh9I4zhynl++qPCLUDKMfTnNAER5O6+aQQuxc9HZTnzRkoPbbKo9VqqSeTYzG6U", + "XUovTXnIxhtefbtZuRff9sR+q0hS08Ry+lkVMYHijFZXYPBrDXy8jndfHq7jeLTvATdAVsnADbBUCgUG", + "WCrB/MxhlKVzerkC1jWuK6RalO3zULYlAJ0zAG20dJolCrVA1TwU7WfCIB7tQ24vKJ3coHYFqItR/Ww9", + "+MCos6HQxxwDtMf3Zgo7X5DfN93akf7Ecy2i/tZT7F2xf0oio3AlXhlvPRQMrIeaDRWO5u4oWyjzzV/G", + "+MrzzsaoVEe1Z04Oxrc6yPVTpYtdWcGihl+IGi5pw5xpQ0tb0VmSB2u0zVMIXVYMEgk9EvbSielMcFce", + "sZjhLzcaGBj5tij8UUYV7XmGuULPl2vozbh2xjHVdDdTDTYwzWDWrAqzaw0MSx4tvJWHIIywNY8cGKFT", + "N+GxMV7FsZFp0JbH1ybCTyNmhrp2oMoIU0uDFSOcUq8oY1zSaS8jfGNrfDKesVW+xuo72Jc6g15oakPO", + "9DPxxVIvlnqx1Iul/nIt9VKvOly9ih2oVsWOo07Fpq1RTfu5e6KoRLs4tUQmS2SyRCZLZPJV5ZBGBUXT", + "3SJTWXy92i37bAq3RttEJpnkasVW2RRWo3Jbvmfps5DEyOhPQzIedX8zm6iNPhPJOE1ti4zvcHWqwd2E", + "ZYWVVVOjSrVo5ZeolUtOfoicXHFZ5qy5uRX69nJ0HXYs5Or9ZCzvKbFtoTUy9sVKfyWxw8i4WbEGji0O", + "6c1SDHV8/mSlf9KH7TSxO+PqlIWNSFeYVXvDprER1mqQPZyOr89VEafd96fgz7Tcp43esOynT2d0+a+H", + "RHVdGuNXXoRgjFVu0W4TYdGjyBipaZGwisueQz7khpNpLhlpt/lsWKa/GPTFoC8GfTHoX7ZBX2pgh62B", + "sQPWv9jx1L7Y9HWvafepHCaYGVQUWwKaJaBZApoloPnqMlTjyqXplpYDOQf9WjL7rArJRjtfDiGLSpW5", + "cqNdf3n5MgE29trqq41GLUw1KmMbnKGVL7qzh8rMy1VwSrf+GWJrXkE4dw1u+E2KkqqnCt1fWVt0edHl", + "pfxwFOWHdMnOXHcwIGqt4NDOg3mloQ23xRKDRVvdXzhY7PViryfMrorlciTBS1+yNG45zJ4ltU2rfnpk", + "bU4rSU/b7cXdEeNv6VsZpVfiHWNzpOLEUsVRidrOQbgurs1sqhKz8UkwnVk2LHAqSVg62KXEXb0S2jLS", + "AZs1l3j5APGy0nzNHD7b48FaNK3NknlwrUnKYqx9tDfpS95WOTOp86WRewJpENIuV3sVuecJTMO1YjFL", + "6eWC1bv6OI3RqiLG4u6/mweOoOKiv48DLqzLB/eURu43IGW+Ozpr518v4BI/sHEh1zndqUKtoaPLReUh", + "HWG9yqCMxaW+99FAWjn/vfJqHcIsEntuILJyiLnQdkikZcQLg00cpzehdgjvn4hcJcAf4uSiy5FsyER7", + "Z1yma3fetX2ufGvnYIc5AkGnt2viU7sqxXWj9RX2aFGWVdVi0Of9OnUtoI7PIBQD0NFP9RiO3iJUxpjL", + "LdpFm8RMbPYIeslIOgV4uYsSD/ZzBn18gmyOqFeivYM6esmqBl0V8S162PQa/Mtd9At6eOMdY3RVGYSO", + "OFvGcexRVm2UQn75xp78Lm6Nj/HX6SuvizfGl6Ea1NfFneBDixVNVJVLtA0xFUwNLwE1kY3dC9TEdMCz", + "KkVZNOcGiKlJS6IIuvvKDfu5AjY1resr+aJkn6WSLQW5OQtyzSU1VxnOEmXz4pseIwYlNx0CU3zUNjWs", + "XZ+0F+P6pXjwgdGjUpmPIg5oj7eNlXW+r8460zvi07PZ3Faj/C30/Rvo3upH+T8Vb5jbiIJ645fRK7yJ", + "0hxTwVRMfVNcpqaixHS4YD9XAfDh6m3WYCTljoH7PSIgolhAFmrKwBZiX6GVpfZpRP6L4n2WirckAIdI", + "AMqVNXcCYEjZXgLQzYiFBKCLgL0EYCJjq5ENLAb3S/H0I6PWmoIfX7zQmyGMV+D5M4SuudbOECaZ6Eq6", + "oJ8lWLAZxuu6RDB8Y2mBQgDGHG1igjnbRIhuKPKFiTdiyAsDiAkzxJLujoSeRxEbi4sgfh/S2/FzDF2O", + "78bO7g1K9qmNFAwmuw0Lhx5rKDB8iqGP+UPpiRAR2fXYidhD6tnCxe52G+yOHlkU3/jYLZL+0d6MrRmH", + "PGYWMaWfdMehGHsAv9QZM5d8yJz7Oo6ikHLkgRs/dG/dPcSktO5bGgaA7xG4DN1bxMFFuqqbll0r016M", + "92K8F+O9GO+v2ngvdasD1K1mL1cduko1VXFq2pqU1WBEoxK1BCRLQLIEJEtAsmSTNuq6puVcu9a/r4j7", + "GRRvjWq2FmczQYzoXT5PYnmdOXvOo7OTEz90ob8PGT/77vT01Hn8+Pj/AQAA//9KmDaF3CABAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go index a2fa23acf..baff77f32 100644 --- a/portal-db/sdk/go/models.go +++ b/portal-db/sdk/go/models.go @@ -256,6 +256,11 @@ const ( PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" ) +// Defines values for GetPortalWorkersAccountDataParamsPrefer. +const ( + GetPortalWorkersAccountDataParamsPreferCountNone GetPortalWorkersAccountDataParamsPrefer = "count=none" +) + // Defines values for PostRpcArmorParamsPrefer. const ( PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" @@ -351,7 +356,7 @@ const ( // Defines values for GetServicesParamsPrefer. const ( - CountNone GetServicesParamsPrefer = "count=none" + GetServicesParamsPreferCountNone GetServicesParamsPrefer = "count=none" ) // Defines values for PatchServicesParamsPrefer. @@ -512,6 +517,27 @@ type PortalPlans struct { // PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. type PortalPlansPlanUsageLimitInterval string +// PortalWorkersAccountData Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' +type PortalWorkersAccountData struct { + BillingType *string `json:"billing_type,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + OwnerEmail *string `json:"owner_email,omitempty"` + + // OwnerUserId Note: + // This is a Primary Key. + OwnerUserId *string `json:"owner_user_id,omitempty"` + + // PortalAccountId Note: + // This is a Primary Key. + PortalAccountId *string `json:"portal_account_id,omitempty"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType *string `json:"portal_plan_type,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + // ServiceEndpoints Available endpoint types for each service type ServiceEndpoints struct { CreatedAt *string `json:"created_at,omitempty"` @@ -757,6 +783,30 @@ type RowFilterPortalPlansPortalPlanType = string // RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. type RowFilterPortalPlansPortalPlanTypeDescription = string +// RowFilterPortalWorkersAccountDataBillingType defines model for rowFilter.portal_workers_account_data.billing_type. +type RowFilterPortalWorkersAccountDataBillingType = string + +// RowFilterPortalWorkersAccountDataGcpEntitlementId defines model for rowFilter.portal_workers_account_data.gcp_entitlement_id. +type RowFilterPortalWorkersAccountDataGcpEntitlementId = string + +// RowFilterPortalWorkersAccountDataOwnerEmail defines model for rowFilter.portal_workers_account_data.owner_email. +type RowFilterPortalWorkersAccountDataOwnerEmail = string + +// RowFilterPortalWorkersAccountDataOwnerUserId defines model for rowFilter.portal_workers_account_data.owner_user_id. +type RowFilterPortalWorkersAccountDataOwnerUserId = string + +// RowFilterPortalWorkersAccountDataPortalAccountId defines model for rowFilter.portal_workers_account_data.portal_account_id. +type RowFilterPortalWorkersAccountDataPortalAccountId = string + +// RowFilterPortalWorkersAccountDataPortalAccountUserLimit defines model for rowFilter.portal_workers_account_data.portal_account_user_limit. +type RowFilterPortalWorkersAccountDataPortalAccountUserLimit = string + +// RowFilterPortalWorkersAccountDataPortalPlanType defines model for rowFilter.portal_workers_account_data.portal_plan_type. +type RowFilterPortalWorkersAccountDataPortalPlanType = string + +// RowFilterPortalWorkersAccountDataUserAccountName defines model for rowFilter.portal_workers_account_data.user_account_name. +type RowFilterPortalWorkersAccountDataUserAccountName = string + // RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. type RowFilterServiceEndpointsCreatedAt = string @@ -1466,6 +1516,42 @@ type PostPortalPlansParams struct { // PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. type PostPortalPlansParamsPrefer string +// GetPortalWorkersAccountDataParams defines parameters for GetPortalWorkersAccountData. +type GetPortalWorkersAccountDataParams struct { + PortalAccountId *RowFilterPortalWorkersAccountDataPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + UserAccountName *RowFilterPortalWorkersAccountDataUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + PortalPlanType *RowFilterPortalWorkersAccountDataPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + BillingType *RowFilterPortalWorkersAccountDataBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + PortalAccountUserLimit *RowFilterPortalWorkersAccountDataPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + GcpEntitlementId *RowFilterPortalWorkersAccountDataGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + OwnerEmail *RowFilterPortalWorkersAccountDataOwnerEmail `form:"owner_email,omitempty" json:"owner_email,omitempty"` + OwnerUserId *RowFilterPortalWorkersAccountDataOwnerUserId `form:"owner_user_id,omitempty" json:"owner_user_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalWorkersAccountDataParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalWorkersAccountDataParamsPrefer defines parameters for GetPortalWorkersAccountData. +type GetPortalWorkersAccountDataParamsPrefer string + // GetRpcArmorParams defines parameters for GetRpcArmor. type GetRpcArmorParams struct { Empty string `form:"" json:""` diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES index 3fe1aaf61..797bc5058 100644 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore README.md package.json src/apis/IntrospectionApi.ts @@ -11,6 +10,7 @@ src/apis/PortalAccountsApi.ts src/apis/PortalApplicationRbacApi.ts src/apis/PortalApplicationsApi.ts src/apis/PortalPlansApi.ts +src/apis/PortalWorkersAccountDataApi.ts src/apis/RpcArmorApi.ts src/apis/RpcDearmorApi.ts src/apis/RpcGenRandomUuidApi.ts @@ -29,6 +29,7 @@ src/models/PortalAccounts.ts src/models/PortalApplicationRbac.ts src/models/PortalApplications.ts src/models/PortalPlans.ts +src/models/PortalWorkersAccountData.ts src/models/RpcArmorPostRequest.ts src/models/RpcGenSaltPostRequest.ts src/models/ServiceEndpoints.ts diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index b95617b40..4e066a339 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1,96 +1,46 @@ -# TypeScript SDK for Portal DB +## @grove/portal-db-sdk@12.0.2 (a4e00ff) -Auto-generated TypeScript client for the Portal Database API. +This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: -## Installation +Environment +* Node.js +* Webpack +* Browserify -```bash -npm install @grove/portal-db-sdk -``` - -> **TODO**: Publish this package to npm registry - -## Quick Start +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 -Built-in client methods (auto-generated): +Module system +* CommonJS +* ES6 module system -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; +It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) -// Create client -const config = new Configuration({ - basePath: "http://localhost:3000" -}); -const client = new PortalApplicationsApi(config); +### Building -// Use built-in methods - no manual paths needed! -const applications = await client.portalApplicationsGet(); +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build ``` -React integration: - -```typescript -import { PortalApplicationsApi, RpcCreatePortalApplicationApi, Configuration } from "@grove/portal-db-sdk"; -import { useState, useEffect } from "react"; - -const config = new Configuration({ basePath: "http://localhost:3000" }); -const portalAppsClient = new PortalApplicationsApi(config); -const createAppClient = new RpcCreatePortalApplicationApi(config); +### Publishing -function PortalApplicationsList() { - const [applications, setApplications] = useState([]); - const [loading, setLoading] = useState(true); +First build the package then run `npm publish` - useEffect(() => { - portalAppsClient.portalApplicationsGet().then((apps) => { - setApplications(apps); - setLoading(false); - }); - }, []); +### Consuming - const createApp = async () => { - await createAppClient.rpcCreatePortalApplicationPost({ - rpcCreatePortalApplicationPostRequest: { - pPortalAccountId: "account-123", - pPortalUserId: "user-456", - pPortalApplicationName: "My App", - pEmoji: "๐Ÿš€" - } - }); - // Refresh list - const apps = await portalAppsClient.portalApplicationsGet(); - setApplications(apps); - }; +navigate to the folder of your consuming project and run one of the following commands. - if (loading) return "Loading..."; +_published:_ - return ( -
- -
    - {applications.map(app => ( -
  • - {app.emoji} {app.portalApplicationName} -
  • - ))} -
-
- ); -} +``` +npm install @grove/portal-db-sdk@12.0.2 (a4e00ff) --save ``` -## Authentication - -Add JWT tokens to your requests: - -```typescript -import { PortalApplicationsApi, Configuration } from "@grove/portal-db-sdk"; - -// With JWT auth -const config = new Configuration({ - basePath: "http://localhost:3000", - accessToken: jwtToken -}); +_unPublished (not recommended):_ -const client = new PortalApplicationsApi(config); +``` +npm install PATH_TO_GENERATED_PACKAGE --save ``` diff --git a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts new file mode 100644 index 000000000..a933445cb --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts @@ -0,0 +1,152 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalWorkersAccountData, +} from '../models/index'; +import { + PortalWorkersAccountDataFromJSON, + PortalWorkersAccountDataToJSON, +} from '../models/index'; + +export interface PortalWorkersAccountDataGetRequest { + portalAccountId?: string; + userAccountName?: string; + portalPlanType?: string; + billingType?: string; + portalAccountUserLimit?: number; + gcpEntitlementId?: string; + ownerEmail?: string; + ownerUserId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalWorkersAccountDataGetPreferEnum; +} + +/** + * + */ +export class PortalWorkersAccountDataApi extends runtime.BaseAPI { + + /** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' + */ + async portalWorkersAccountDataGetRaw(requestParameters: PortalWorkersAccountDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['ownerEmail'] != null) { + queryParameters['owner_email'] = requestParameters['ownerEmail']; + } + + if (requestParameters['ownerUserId'] != null) { + queryParameters['owner_user_id'] = requestParameters['ownerUserId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_workers_account_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalWorkersAccountDataFromJSON)); + } + + /** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' + */ + async portalWorkersAccountDataGet(requestParameters: PortalWorkersAccountDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalWorkersAccountDataGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + +} + +/** + * @export + */ +export const PortalWorkersAccountDataGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalWorkersAccountDataGetPreferEnum = typeof PortalWorkersAccountDataGetPreferEnum[keyof typeof PortalWorkersAccountDataGetPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts index 9d9f59f95..7d4580df0 100644 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -8,6 +8,7 @@ export * from './PortalAccountsApi'; export * from './PortalApplicationRbacApi'; export * from './PortalApplicationsApi'; export * from './PortalPlansApi'; +export * from './PortalWorkersAccountDataApi'; export * from './RpcArmorApi'; export * from './RpcDearmorApi'; export * from './RpcGenRandomUuidApi'; diff --git a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts new file mode 100644 index 000000000..44834dcec --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' + * @export + * @interface PortalWorkersAccountData + */ +export interface PortalWorkersAccountData { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalWorkersAccountData + */ + portalAccountId?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + userAccountName?: string; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalWorkersAccountData + */ + portalPlanType?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + billingType?: string; + /** + * + * @type {number} + * @memberof PortalWorkersAccountData + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + ownerEmail?: string; + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalWorkersAccountData + */ + ownerUserId?: string; +} + +/** + * Check if a given object implements the PortalWorkersAccountData interface. + */ +export function instanceOfPortalWorkersAccountData(value: object): value is PortalWorkersAccountData { + return true; +} + +export function PortalWorkersAccountDataFromJSON(json: any): PortalWorkersAccountData { + return PortalWorkersAccountDataFromJSONTyped(json, false); +} + +export function PortalWorkersAccountDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalWorkersAccountData { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'] == null ? undefined : json['portal_account_id'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'portalPlanType': json['portal_plan_type'] == null ? undefined : json['portal_plan_type'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'ownerEmail': json['owner_email'] == null ? undefined : json['owner_email'], + 'ownerUserId': json['owner_user_id'] == null ? undefined : json['owner_user_id'], + }; +} + +export function PortalWorkersAccountDataToJSON(json: any): PortalWorkersAccountData { + return PortalWorkersAccountDataToJSONTyped(json, false); +} + +export function PortalWorkersAccountDataToJSONTyped(value?: PortalWorkersAccountData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'user_account_name': value['userAccountName'], + 'portal_plan_type': value['portalPlanType'], + 'billing_type': value['billingType'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'owner_email': value['ownerEmail'], + 'owner_user_id': value['ownerUserId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts index 316dd6fee..5edb1a98a 100644 --- a/portal-db/sdk/typescript/src/models/index.ts +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -7,6 +7,7 @@ export * from './PortalAccounts'; export * from './PortalApplicationRbac'; export * from './PortalApplications'; export * from './PortalPlans'; +export * from './PortalWorkersAccountData'; export * from './RpcArmorPostRequest'; export * from './RpcGenSaltPostRequest'; export * from './ServiceEndpoints'; From eba8d31b419876905f3468817803848d32fa0354 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 8 Oct 2025 17:22:38 +0100 Subject: [PATCH 35/43] remove duplicate scripts --- portal-db/api/scripts/gen-jwt.sh | 165 ----------------------------- portal-db/api/scripts/test-auth.sh | 130 ----------------------- 2 files changed, 295 deletions(-) delete mode 100755 portal-db/api/scripts/gen-jwt.sh delete mode 100755 portal-db/api/scripts/test-auth.sh diff --git a/portal-db/api/scripts/gen-jwt.sh b/portal-db/api/scripts/gen-jwt.sh deleted file mode 100755 index 3badb903c..000000000 --- a/portal-db/api/scripts/gen-jwt.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/bash - -# ============================================================================ -# JWT Token Generator for PostgREST (Shell Script Version) -# ============================================================================ -# Generates JWT tokens for PostgREST authentication using shell commands -# Following PostgREST Tutorial: https://docs.postgrest.org/en/v13/tutorials/tut1.html -# -# Dependencies: -# - openssl (for HMAC-SHA256 signing) -# - base64 (for encoding) -# - jq (for JSON processing) -# -# Usage: -# ./gen-jwt.sh # Generate token for 'authenticated' role -# ./gen-jwt.sh anon # Generate token for 'anon' role -# ./gen-jwt.sh authenticated user@email # Generate token with specific email - -set -e # Exit on any error - -# JWT secret from postgrest.conf (must match exactly) -JWT_SECRET="supersecretjwtsecretforlocaldevelopment123456789" - -# Check for help flag first -if [[ "$1" == "--help" || "$1" == "-h" ]]; then - cat << 'EOF' -# ============================================================================ -# JWT Token Generator for PostgREST (Shell Script Version) -# ============================================================================ -# Generates JWT tokens for PostgREST authentication using shell commands -# Following PostgREST Tutorial: https://docs.postgrest.org/en/v13/tutorials/tut1.html -# -# Dependencies: -# - openssl (for HMAC-SHA256 signing) -# - base64 (for encoding) -# - jq (for JSON processing) -# -# Usage: -# ./gen-jwt.sh # Generate token for 'authenticated' role -# ./gen-jwt.sh anon # Generate token for 'anon' role -# ./gen-jwt.sh authenticated user@email # Generate token with specific email -# ./gen-jwt.sh --help # Show this help message -EOF - exit 0 -fi - -# Get command line arguments -ROLE="${1:-authenticated}" -EMAIL="${2:-john@doe.com}" - -# Calculate expiration (1 hour from now) -EXP=$(date -d '+1 hour' +%s 2>/dev/null || date -v+1H +%s 2>/dev/null || echo $(($(date +%s) + 3600))) - -# ============================================================================ -# JWT Generation Functions -# ============================================================================ - -# Base64 URL encoding (removes padding and makes URL-safe) -base64url_encode() { - base64 -w 0 2>/dev/null | tr '+/' '-_' | tr -d '=' || base64 | tr '+/' '-_' | tr -d '=' -} - -# Base64 URL decoding (adds padding and decodes) -base64url_decode() { - local input="$1" - # Add padding if needed - case $((${#input} % 4)) in - 2) input="${input}==" ;; - 3) input="${input}=" ;; - esac - echo "$input" | tr '_-' '/+' | base64 -d 2>/dev/null || echo "$input" | tr '_-' '/+' | base64 -D 2>/dev/null -} - -# Create JWT header -create_header() { - echo -n '{"alg":"HS256","typ":"JWT"}' | base64url_encode -} - -# Create JWT payload -create_payload() { - local role="$1" - local email="$2" - local exp="$3" - - # Create JSON payload - echo -n "{\"role\":\"$role\",\"email\":\"$email\",\"exp\":$exp}" | base64url_encode -} - -# Create JWT signature using HMAC-SHA256 -create_signature() { - local data="$1" - local secret="$2" - - echo -n "$data" | openssl dgst -sha256 -hmac "$secret" -binary | base64url_encode -} - -# ============================================================================ -# Generate JWT Token -# ============================================================================ - -echo "๐Ÿ”‘ Generating JWT Token with Shell Script โœจ" -echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" - -# Create header and payload -echo "๐Ÿ“ Creating JWT components..." -HEADER=$(create_header) -PAYLOAD=$(create_payload "$ROLE" "$EMAIL" "$EXP") - -# Create signature data (header.payload) -SIGNATURE_DATA="$HEADER.$PAYLOAD" - -# Generate signature -echo "๐Ÿ” Signing token with HMAC-SHA256..." -SIGNATURE=$(create_signature "$SIGNATURE_DATA" "$JWT_SECRET") - -# Complete JWT token -JWT_TOKEN="$SIGNATURE_DATA.$SIGNATURE" - -# ============================================================================ -# Display Results -# ============================================================================ - -echo "โœ… JWT Token Generated Successfully!" -echo "" -echo "๐Ÿ‘ค Role: $ROLE" -echo "๐Ÿ“ง Email: $EMAIL" -echo "โฐ Expires: $(date -d @$EXP 2>/dev/null || date -r $EXP 2>/dev/null || echo "Unix timestamp: $EXP")" -echo "" -echo "๐ŸŽŸ๏ธ Token:" -echo "$JWT_TOKEN" -echo "" -echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" -echo "๐Ÿš€ Usage Example:" -echo "curl http://localhost:3000/rpc/me \\" -echo " -H \"Authorization: Bearer $JWT_TOKEN\" \\" -echo " -H \"Content-Type: application/json\"" -echo "๐Ÿ”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๐Ÿ”" - -# ============================================================================ -# Verification and Debugging -# ============================================================================ - -echo "" -echo "๐Ÿ” Token Payload (decoded for verification):" - -# Decode the payload using our custom base64url_decode function -DECODED_PAYLOAD=$(base64url_decode "$PAYLOAD") - -if command -v jq >/dev/null 2>&1; then - # Pretty print with jq if available - echo "$DECODED_PAYLOAD" | jq . 2>/dev/null || echo "โŒ Could not parse JSON payload" -else - # Basic JSON formatting without jq - echo "$DECODED_PAYLOAD" | sed 's/,/,\n /g' | sed 's/{/{\n /' | sed 's/}/\n}/' || echo "โŒ Could not decode payload" - echo "" - echo "๐Ÿ’ก Install 'jq' for better JSON formatting: brew install jq" -fi - -# Export token for use by other scripts -export JWT_TOKEN -echo "" -echo "๐Ÿ’พ Token exported as \$JWT_TOKEN environment variable for use in other scripts! ๐ŸŽฏ" - -echo "" -echo "๐ŸŽ‰ Happy testing with PostgREST! ๐Ÿš€" diff --git a/portal-db/api/scripts/test-auth.sh b/portal-db/api/scripts/test-auth.sh deleted file mode 100755 index b30fc0152..000000000 --- a/portal-db/api/scripts/test-auth.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -# ============================================================================ -# JWT Authentication Test Script -# ============================================================================ -# This script tests the basic JWT authentication functionality -# Make sure the services are running: make postgrest-up - -set -e # Exit on any error - -API_URL="http://localhost:3000" -echo "๐Ÿ” Testing JWT Authentication with PostgREST" -echo "API URL: $API_URL" -echo - -# ============================================================================ -# Test 1: Anonymous Access (should work) -# ============================================================================ -echo "๐Ÿ“– Test 1: Anonymous access to public data" -echo "GET $API_URL/networks" - -RESPONSE=$(curl -s "$API_URL/networks" || echo "ERROR") -if [[ "$RESPONSE" == *"ERROR"* ]] || [[ "$RESPONSE" == *"error"* ]]; then - echo "โŒ Anonymous access failed" - echo "Response: $RESPONSE" - exit 1 -else - echo "โœ… Anonymous access works" - echo "Found $(echo "$RESPONSE" | jq length 2>/dev/null || echo "some") networks" -fi -echo - -# ============================================================================ -# Test 2: Generate JWT Token (External Generation) -# ============================================================================ -echo "๐Ÿ”‘ Test 2: Generating JWT token (following PostgREST docs) โœจ" - -# Generate JWT token using shell script (PostgREST best practice) -echo "๐Ÿ”ง Generating fresh JWT token using shell script..." -cd "$(dirname "$0")" # Ensure we're in the scripts directory - -# Generate token and capture output -JWT_OUTPUT=$(./gen-jwt.sh authenticated 2>/dev/null) -TOKEN=$(echo "$JWT_OUTPUT" | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) - -if [[ -z "$TOKEN" ]]; then - echo "โŒ Failed to generate JWT token" - echo "๐Ÿ’ก Make sure gen-jwt.sh is executable and openssl is installed" - exit 1 -fi - -echo "โœ… Generated fresh JWT token: ${TOKEN:0:50}... ๐ŸŽฏ" -echo "๐ŸŒŸ This demonstrates external JWT generation (PostgREST best practice)" -echo - -# ============================================================================ -# Test 3: Access Protected Resource with Token -# ============================================================================ -echo "๐Ÿ”’ Test 3: Access protected data with JWT token" -echo "GET $API_URL/portal_accounts (with Authorization header)" - -AUTH_RESPONSE=$(curl -s "$API_URL/portal_accounts" \ - -H "Authorization: Bearer $TOKEN" || echo "ERROR") - -if [[ "$AUTH_RESPONSE" == *"ERROR"* ]] || [[ "$AUTH_RESPONSE" == *"error"* ]]; then - echo "โŒ Authenticated access failed" - echo "Response: $AUTH_RESPONSE" - exit 1 -else - echo "โœ… Authenticated access works" - echo "Found $(echo "$AUTH_RESPONSE" | jq length 2>/dev/null || echo "some") portal accounts" -fi -echo - -# ============================================================================ -# Test 4: Get Current User Info -# ============================================================================ -echo "๐Ÿ‘ค Test 4: Get current user info" -echo "POST $API_URL/rpc/me" - -ME_RESPONSE=$(curl -s -X POST "$API_URL/rpc/me" \ - -H "Authorization: Bearer $TOKEN" \ - -H "Content-Type: application/json" || echo "ERROR") - -if [[ "$ME_RESPONSE" == *"ERROR"* ]] || [[ "$ME_RESPONSE" == *"error"* ]]; then - echo "โŒ Get user info failed" - echo "Response: $ME_RESPONSE" - exit 1 -else - echo "โœ… Get user info works" - echo "User info: $ME_RESPONSE" -fi -echo - -# ============================================================================ -# Test 5: Access Protected Resource WITHOUT Token (should fail) -# ============================================================================ -echo "๐Ÿšซ Test 5: Try to access protected data without token (should fail)" -echo "GET $API_URL/portal_accounts (no Authorization header)" - -UNAUTH_RESPONSE=$(curl -s "$API_URL/portal_accounts" || echo "ERROR") -# We expect this to either return empty or give an error - both are fine - -echo "Response: $UNAUTH_RESPONSE" -echo "โœ… This test shows the difference between authenticated and anonymous access" -echo - -# ============================================================================ -# Summary -# ============================================================================ -echo "๐ŸŽ‰ All JWT authentication tests passed! ๐Ÿš€" -echo -echo "๐Ÿ“Š Summary:" -echo "- โœ… Anonymous users can access public data ๐ŸŒ" -echo "- โœ… JWT tokens (generated externally) provide access to protected data ๐Ÿ”" -echo "- โœ… JWT claims can be accessed in SQL via current_setting() ๐Ÿ“‹" -echo "- โœ… Requests without tokens have limited access ๐Ÿšซ" -echo -echo "๐Ÿ“š PostgREST Documentation Approach:" -echo "- โœ… JWT tokens generated externally (as documented) ๐Ÿ”ง" -echo "- โœ… Simple role-based access control via JWT role claim ๐Ÿ‘ฅ" -echo "- โœ… No hardcoded user data in database functions ๐ŸŽฏ" -echo -echo "๐Ÿš€ Next steps:" -echo "- ๐Ÿ“– Try the examples in api/auth-examples.md" -echo "- ๐Ÿ”‘ Generate your own JWT tokens: ./api/scripts/gen-jwt.sh" -echo "- ๐Ÿ“„ View the API documentation at $API_URL" -echo "- ๐Ÿ” Explore the database roles and permissions" -echo -echo "๐ŸŽŠ Happy coding with PostgREST! โœจ" From e781b4536bfabca405a06535a641324a3f07a1b3 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 8 Oct 2025 18:37:47 +0100 Subject: [PATCH 36/43] generate latest sdks --- portal-db/api/openapi/openapi.json | 4147 +---- portal-db/sdk/go/client.go | 14113 ++-------------- portal-db/sdk/go/models.go | 2029 +-- .../sdk/typescript/.openapi-generator/FILES | 22 - .../sdk/typescript/src/apis/NetworksApi.ts | 277 - .../typescript/src/apis/OrganizationsApi.ts | 337 - .../src/apis/PortalAccountRbacApi.ts | 337 - .../typescript/src/apis/PortalAccountsApi.ts | 487 - .../src/apis/PortalApplicationRbacApi.ts | 337 - .../src/apis/PortalApplicationsApi.ts | 472 - .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 - .../src/apis/PortalWorkersAccountDataApi.ts | 152 - .../src/apis/ServiceEndpointsApi.ts | 337 - .../src/apis/ServiceFallbacksApi.ts | 337 - .../sdk/typescript/src/apis/ServicesApi.ts | 532 - portal-db/sdk/typescript/src/apis/index.ts | 11 - .../sdk/typescript/src/models/Networks.ts | 67 - .../typescript/src/models/Organizations.ts | 100 - .../src/models/PortalAccountRbac.ts | 104 - .../typescript/src/models/PortalAccounts.ts | 196 - .../src/models/PortalApplicationRbac.ts | 103 - .../src/models/PortalApplications.ts | 185 - .../sdk/typescript/src/models/PortalPlans.ts | 119 - .../src/models/PortalWorkersAccountData.ts | 124 - .../typescript/src/models/ServiceEndpoints.ts | 116 - .../typescript/src/models/ServiceFallbacks.ts | 102 - .../sdk/typescript/src/models/Services.ts | 206 - portal-db/sdk/typescript/src/models/index.ts | 11 - 28 files changed, 1219 insertions(+), 24493 deletions(-) delete mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts delete mode 100644 portal-db/sdk/typescript/src/models/Networks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Services.ts diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index 580f3954b..e1a15b69d 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -19,3370 +19,395 @@ ] } }, - "/service_fallbacks": { + "/rpc/gen_salt": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_fallbacks" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_fallbacks" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_fallbacks" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_fallbacks" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" + "description": "OK" } }, - "summary": "Fallback URLs for services when primary endpoints fail", "tags": [ - "service_fallbacks" + "(rpc) gen_salt" ] }, "post": { "parameters": [ { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" + "$ref": "#/components/parameters/preferParams" } ], "requestBody": { - "$ref": "#/components/requestBodies/service_fallbacks" + "$ref": "#/components/requestBodies/Args2" }, "responses": { - "201": { - "description": "Created" + "200": { + "description": "OK" } }, - "summary": "Fallback URLs for services when primary endpoints fail", "tags": [ - "service_fallbacks" + "(rpc) gen_salt" ] - }, - "delete": { + } + }, + "/rpc/pgp_armor_headers": { + "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK" } }, - "summary": "Fallback URLs for services when primary endpoints fail", "tags": [ - "service_fallbacks" + "(rpc) pgp_armor_headers" ] }, - "patch": { + "post": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" + "$ref": "#/components/parameters/preferParams" } ], "requestBody": { - "$ref": "#/components/requestBodies/service_fallbacks" + "$ref": "#/components/requestBodies/Args2" }, "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK" } }, - "summary": "Fallback URLs for services when primary endpoints fail", "tags": [ - "service_fallbacks" + "(rpc) pgp_armor_headers" ] } }, - "/portal_application_rbac": { + "/rpc/armor": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_application_rbac" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_application_rbac" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_application_rbac" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_application_rbac" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" + "description": "OK" } }, - "summary": "User access controls for specific applications", "tags": [ - "portal_application_rbac" + "(rpc) armor" ] }, "post": { "parameters": [ { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" + "$ref": "#/components/parameters/preferParams" } ], "requestBody": { - "$ref": "#/components/requestBodies/portal_application_rbac" + "$ref": "#/components/requestBodies/Args" }, "responses": { - "201": { - "description": "Created" + "200": { + "description": "OK" } }, - "summary": "User access controls for specific applications", "tags": [ - "portal_application_rbac" + "(rpc) armor" ] - }, - "delete": { + } + }, + "/rpc/pgp_key_id": { + "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK" } }, - "summary": "User access controls for specific applications", "tags": [ - "portal_application_rbac" + "(rpc) pgp_key_id" ] }, - "patch": { + "post": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" + "$ref": "#/components/parameters/preferParams" } ], "requestBody": { - "$ref": "#/components/requestBodies/portal_application_rbac" + "$ref": "#/components/requestBodies/Args" }, "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK" } }, - "summary": "User access controls for specific applications", "tags": [ - "portal_application_rbac" + "(rpc) pgp_key_id" ] } }, - "/portal_plans": { + "/rpc/dearmor": { "get": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_plans" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_plans" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_plans" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_plans" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" + "description": "OK" } }, - "summary": "Available subscription plans for Portal Accounts", "tags": [ - "portal_plans" + "(rpc) dearmor" ] }, "post": { "parameters": [ { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" + "$ref": "#/components/parameters/preferParams" } ], "requestBody": { - "$ref": "#/components/requestBodies/portal_plans" + "$ref": "#/components/requestBodies/Args2" }, "responses": { - "201": { - "description": "Created" + "200": { + "description": "OK" } }, - "summary": "Available subscription plans for Portal Accounts", "tags": [ - "portal_plans" + "(rpc) dearmor" ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], + } + }, + "/rpc/gen_random_uuid": { + "get": { "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK" } }, - "summary": "Available subscription plans for Portal Accounts", "tags": [ - "portal_plans" + "(rpc) gen_random_uuid" ] }, - "patch": { + "post": { "parameters": [ { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_plans" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available subscription plans for Portal Accounts", - "tags": [ - "portal_plans" - ] - } - }, - "/portal_applications": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_applications" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_applications" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_applications" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_applications" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_applications" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_applications" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Applications created within portal accounts with their own rate limits and settings", - "tags": [ - "portal_applications" - ] - } - }, - "/services": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/components/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.active" - }, - { - "$ref": "#/components/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/components/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/services" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/services" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/services" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/services" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/services" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/components/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.active" - }, - { - "$ref": "#/components/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/components/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.services.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_name" - }, - { - "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_domains" - }, - { - "$ref": "#/components/parameters/rowFilter.services.service_owner_address" - }, - { - "$ref": "#/components/parameters/rowFilter.services.network_id" - }, - { - "$ref": "#/components/parameters/rowFilter.services.active" - }, - { - "$ref": "#/components/parameters/rowFilter.services.beta" - }, - { - "$ref": "#/components/parameters/rowFilter.services.coming_soon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" - }, - { - "$ref": "#/components/parameters/rowFilter.services.svg_icon" - }, - { - "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" - }, - { - "$ref": "#/components/parameters/rowFilter.services.status_query" - }, - { - "$ref": "#/components/parameters/rowFilter.services.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.services.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/services" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain services from the Pocket Network", - "tags": [ - "services" - ] - } - }, - "/portal_accounts": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_accounts" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_accounts" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_accounts" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_accounts" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_accounts" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_accounts" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Multi-tenant accounts with plans and billing integration", - "tags": [ - "portal_accounts" - ] - } - }, - "/organizations": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/organizations" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/organizations" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/organizations" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/organizations" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/organizations" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_id" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.organization_name" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.organizations.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/organizations" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Companies or customer groups that can be attached to Portal Accounts", - "tags": [ - "organizations" - ] - } - }, - "/networks": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/networks" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/networks" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/networks" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/networks" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/networks" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.networks.network_id" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/networks" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "tags": [ - "networks" - ] - } - }, - "/portal_workers_account_data": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.user_account_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_plan_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.billing_type" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_user_limit" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.gcp_entitlement_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_email" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_user_id" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_workers_account_data" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_workers_account_data" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_workers_account_data" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_workers_account_data" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", - "tags": [ - "portal_workers_account_data" - ] - } - }, - "/portal_account_rbac": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_account_rbac" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_account_rbac" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_account_rbac" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/portal_account_rbac" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_account_rbac" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" - }, - { - "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/portal_account_rbac" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "User roles and permissions for specific portal accounts", - "tags": [ - "portal_account_rbac" - ] - } - }, - "/service_endpoints": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/range" - }, - { - "$ref": "#/components/parameters/rangeUnit" - }, - { - "$ref": "#/components/parameters/offset" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/preferCount" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_endpoints" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_endpoints" - }, - "type": "array" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_endpoints" - }, - "type": "array" - } - }, - "text/csv": { - "schema": { - "items": { - "$ref": "#/components/schemas/service_endpoints" - }, - "type": "array" - } - } - } - }, - "206": { - "description": "Partial Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/select" - }, - { - "$ref": "#/components/parameters/preferPost" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/service_endpoints" - }, - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - }, - "patch": { - "parameters": [ - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" - }, - { - "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" - }, - { - "$ref": "#/components/parameters/preferReturn" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/service_endpoints" - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "summary": "Available endpoint types for each service", - "tags": [ - "service_endpoints" - ] - } - }, - "/rpc/gen_salt": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - } - }, - "/rpc/pgp_armor_headers": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - } - }, - "/rpc/armor": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "bytea" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) armor" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) armor" - ] - } - }, - "/rpc/pgp_key_id": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "bytea" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - } - }, - "/rpc/dearmor": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) dearmor" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) dearmor" - ] - } - }, - "/rpc/gen_random_uuid": { - "get": { - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_random_uuid" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "type": "object" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "type": "object" - } - }, - "text/csv": { - "schema": { - "type": "object" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_random_uuid" - ] - } - } - }, - "externalDocs": { - "description": "PostgREST Documentation", - "url": "https://postgrest.org/en/v12.0/api.html" - }, - "servers": [ - { - "url": "http://localhost:3000" - } - ], - "components": { - "parameters": { - "preferParams": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "params=single-object" - ] - } - }, - "preferReturn": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none" - ] - } - }, - "preferCount": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "count=none" - ] - } - }, - "preferPost": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none", - "resolution=ignore-duplicates", - "resolution=merge-duplicates" - ] - } - }, - "select": { - "name": "select", - "description": "Filtering Columns", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - "on_conflict": { - "name": "on_conflict", - "description": "On Conflict", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - "order": { - "name": "order", - "description": "Ordering", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - "range": { - "name": "Range", - "description": "Limiting and Pagination", - "required": false, - "in": "header", - "schema": { - "type": "string" - } - }, - "rangeUnit": { - "name": "Range-Unit", - "description": "Limiting and Pagination", - "required": false, - "in": "header", - "schema": { - "type": "string", - "default": "items" - } - }, - "offset": { - "name": "offset", - "description": "Limiting and Pagination", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - "limit": { - "name": "limit", - "description": "Limiting and Pagination", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - "rowFilter.service_fallbacks.service_fallback_id": { - "name": "service_fallback_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.service_fallbacks.service_id": { - "name": "service_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.service_fallbacks.fallback_url": { - "name": "fallback_url", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.service_fallbacks.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.service_fallbacks.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_application_rbac.id": { - "name": "id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_application_rbac.portal_application_id": { - "name": "portal_application_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_application_rbac.portal_user_id": { - "name": "portal_user_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_application_rbac.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_application_rbac.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_plans.portal_plan_type": { - "name": "portal_plan_type", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_plans.portal_plan_type_description": { - "name": "portal_plan_type_description", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_plans.plan_usage_limit": { - "name": "plan_usage_limit", - "description": "Maximum usage allowed within the interval", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_plans.plan_usage_limit_interval": { - "name": "plan_usage_limit_interval", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "public.plan_interval" - } - }, - "rowFilter.portal_plans.plan_rate_limit_rps": { - "name": "plan_rate_limit_rps", - "description": "Rate limit in requests per second", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_plans.plan_application_limit": { - "name": "plan_application_limit", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_applications.portal_application_id": { - "name": "portal_application_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.portal_account_id": { - "name": "portal_account_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.portal_application_name": { - "name": "portal_application_name", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.emoji": { - "name": "emoji", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.portal_application_user_limit": { - "name": "portal_application_user_limit", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_applications.portal_application_user_limit_interval": { - "name": "portal_application_user_limit_interval", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "public.plan_interval" - } - }, - "rowFilter.portal_applications.portal_application_user_limit_rps": { - "name": "portal_application_user_limit_rps", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_applications.portal_application_description": { - "name": "portal_application_description", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.favorite_service_ids": { - "name": "favorite_service_ids", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying[]" - } - }, - "rowFilter.portal_applications.secret_key_hash": { - "name": "secret_key_hash", - "description": "Hashed secret key for application authentication", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_applications.secret_key_required": { - "name": "secret_key_required", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.portal_applications.deleted_at": { - "name": "deleted_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_applications.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_applications.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.services.service_id": { - "name": "service_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.service_name": { - "name": "service_name", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.compute_units_per_relay": { - "name": "compute_units_per_relay", - "description": "Cost in compute units for each relay", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.services.service_domains": { - "name": "service_domains", - "description": "Valid domains for this service", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying[]" - } - }, - "rowFilter.services.service_owner_address": { - "name": "service_owner_address", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.network_id": { - "name": "network_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.active": { - "name": "active", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.services.beta": { - "name": "beta", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.services.coming_soon": { - "name": "coming_soon", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.services.quality_fallback_enabled": { - "name": "quality_fallback_enabled", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.services.hard_fallback_enabled": { - "name": "hard_fallback_enabled", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "boolean" - } - }, - "rowFilter.services.svg_icon": { - "name": "svg_icon", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "text" - } - }, - "rowFilter.services.public_endpoint_url": { - "name": "public_endpoint_url", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.status_endpoint_url": { - "name": "status_endpoint_url", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.services.status_query": { - "name": "status_query", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "text" - } - }, - "rowFilter.services.deleted_at": { - "name": "deleted_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.services.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.services.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_accounts.portal_account_id": { - "name": "portal_account_id", - "description": "Unique identifier for the portal account", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.organization_id": { - "name": "organization_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_accounts.portal_plan_type": { - "name": "portal_plan_type", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.user_account_name": { - "name": "user_account_name", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.internal_account_name": { - "name": "internal_account_name", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.portal_account_user_limit": { - "name": "portal_account_user_limit", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_accounts.portal_account_user_limit_interval": { - "name": "portal_account_user_limit_interval", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "public.plan_interval" - } - }, - "rowFilter.portal_accounts.portal_account_user_limit_rps": { - "name": "portal_account_user_limit_rps", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_accounts.billing_type": { - "name": "billing_type", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.stripe_subscription_id": { - "name": "stripe_subscription_id", - "description": "Stripe subscription identifier for billing", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.gcp_account_id": { - "name": "gcp_account_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.gcp_entitlement_id": { - "name": "gcp_entitlement_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_accounts.deleted_at": { - "name": "deleted_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_accounts.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.portal_accounts.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.organizations.organization_id": { - "name": "organization_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.organizations.organization_name": { - "name": "organization_name", - "description": "Name of the organization", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.organizations.deleted_at": { - "name": "deleted_at", - "description": "Soft delete timestamp", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.organizations.created_at": { - "name": "created_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.organizations.updated_at": { - "name": "updated_at", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "timestamp with time zone" - } - }, - "rowFilter.networks.network_id": { - "name": "network_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.portal_account_id": { - "name": "portal_account_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.user_account_name": { - "name": "user_account_name", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.portal_plan_type": { - "name": "portal_plan_type", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.billing_type": { - "name": "billing_type", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.portal_account_user_limit": { - "name": "portal_account_user_limit", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "integer" - } - }, - "rowFilter.portal_workers_account_data.gcp_entitlement_id": { - "name": "gcp_entitlement_id", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.owner_email": { - "name": "owner_email", - "required": false, - "in": "query", - "schema": { - "type": "string", - "format": "character varying" - } - }, - "rowFilter.portal_workers_account_data.owner_user_id": { - "name": "owner_user_id", + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "type": "object" + } + }, + "text/csv": { + "schema": { + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_random_uuid" + ] + } + } + }, + "externalDocs": { + "description": "PostgREST Documentation", + "url": "https://postgrest.org/en/v12.0/api.html" + }, + "servers": [ + { + "url": "http://localhost:3000" + } + ], + "components": { + "parameters": { + "preferParams": { + "name": "Prefer", + "description": "Preference", "required": false, - "in": "query", + "in": "header", "schema": { "type": "string", - "format": "character varying" + "enum": [ + "params=single-object" + ] } }, - "rowFilter.portal_account_rbac.id": { - "name": "id", + "preferReturn": { + "name": "Prefer", + "description": "Preference", "required": false, - "in": "query", + "in": "header", "schema": { "type": "string", - "format": "integer" + "enum": [ + "return=representation", + "return=minimal", + "return=none" + ] } }, - "rowFilter.portal_account_rbac.portal_account_id": { - "name": "portal_account_id", + "preferCount": { + "name": "Prefer", + "description": "Preference", "required": false, - "in": "query", + "in": "header", "schema": { "type": "string", - "format": "character varying" + "enum": [ + "count=none" + ] } }, - "rowFilter.portal_account_rbac.portal_user_id": { - "name": "portal_user_id", + "preferPost": { + "name": "Prefer", + "description": "Preference", "required": false, - "in": "query", + "in": "header", "schema": { "type": "string", - "format": "character varying" + "enum": [ + "return=representation", + "return=minimal", + "return=none", + "resolution=ignore-duplicates", + "resolution=merge-duplicates" + ] } }, - "rowFilter.portal_account_rbac.role_name": { - "name": "role_name", + "select": { + "name": "select", + "description": "Filtering Columns", "required": false, "in": "query", "schema": { - "type": "string", - "format": "character varying" + "type": "string" } }, - "rowFilter.portal_account_rbac.user_joined_account": { - "name": "user_joined_account", + "on_conflict": { + "name": "on_conflict", + "description": "On Conflict", "required": false, "in": "query", "schema": { - "type": "string", - "format": "boolean" + "type": "string" } }, - "rowFilter.service_endpoints.endpoint_id": { - "name": "endpoint_id", + "order": { + "name": "order", + "description": "Ordering", "required": false, "in": "query", "schema": { - "type": "string", - "format": "integer" + "type": "string" } }, - "rowFilter.service_endpoints.service_id": { - "name": "service_id", + "range": { + "name": "Range", + "description": "Limiting and Pagination", "required": false, - "in": "query", + "in": "header", "schema": { - "type": "string", - "format": "character varying" + "type": "string" } }, - "rowFilter.service_endpoints.endpoint_type": { - "name": "endpoint_type", + "rangeUnit": { + "name": "Range-Unit", + "description": "Limiting and Pagination", "required": false, - "in": "query", + "in": "header", "schema": { "type": "string", - "format": "public.endpoint_type" + "default": "items" } }, - "rowFilter.service_endpoints.created_at": { - "name": "created_at", + "offset": { + "name": "offset", + "description": "Limiting and Pagination", "required": false, "in": "query", "schema": { - "type": "string", - "format": "timestamp with time zone" + "type": "string" } }, - "rowFilter.service_endpoints.updated_at": { - "name": "updated_at", + "limit": { + "name": "limit", + "description": "Limiting and Pagination", "required": false, "in": "query", "schema": { - "type": "string", - "format": "timestamp with time zone" + "type": "string" } } }, - "requestBodies": { - "portal_accounts": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/portal_accounts" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/portal_accounts" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/portal_accounts" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/portal_accounts" - } - } - }, - "description": "portal_accounts" - }, - "networks": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/networks" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/networks" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/networks" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/networks" - } - } - }, - "description": "networks" - }, - "service_endpoints": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/service_endpoints" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/service_endpoints" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/service_endpoints" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/service_endpoints" - } - } - }, - "description": "service_endpoints" - }, + "requestBodies": { "Args": { "content": { "application/json": { @@ -3444,181 +469,6 @@ }, "required": true }, - "portal_applications": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/portal_applications" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/portal_applications" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/portal_applications" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/portal_applications" - } - } - }, - "description": "portal_applications" - }, - "portal_account_rbac": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/portal_account_rbac" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/portal_account_rbac" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/portal_account_rbac" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/portal_account_rbac" - } - } - }, - "description": "portal_account_rbac" - }, - "service_fallbacks": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/service_fallbacks" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/service_fallbacks" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/service_fallbacks" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/service_fallbacks" - } - } - }, - "description": "service_fallbacks" - }, - "portal_application_rbac": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/portal_application_rbac" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/portal_application_rbac" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/portal_application_rbac" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/portal_application_rbac" - } - } - }, - "description": "portal_application_rbac" - }, - "portal_plans": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/portal_plans" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/portal_plans" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/portal_plans" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/portal_plans" - } - } - }, - "description": "portal_plans" - }, - "services": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/services" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/services" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/services" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/services" - } - } - }, - "description": "services" - }, - "organizations": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/organizations" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "$ref": "#/components/schemas/organizations" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "$ref": "#/components/schemas/organizations" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/organizations" - } - } - }, - "description": "organizations" - }, "Args2": { "content": { "application/json": { @@ -3680,587 +530,6 @@ }, "required": true } - }, - "schemas": { - "service_fallbacks": { - "description": "Fallback URLs for services when primary endpoints fail", - "required": [ - "service_fallback_id", - "service_id", - "fallback_url" - ], - "properties": { - "service_fallback_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "service_id": { - "description": "Note:\nThis is a Foreign Key to `services.service_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "fallback_url": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_application_rbac": { - "description": "User access controls for specific applications", - "required": [ - "id", - "portal_application_id", - "portal_user_id" - ], - "properties": { - "id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "portal_application_id": { - "description": "Note:\nThis is a Foreign Key to `portal_applications.portal_application_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_user_id": { - "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_plans": { - "description": "Available subscription plans for Portal Accounts", - "required": [ - "portal_plan_type" - ], - "properties": { - "portal_plan_type": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "portal_plan_type_description": { - "format": "character varying", - "maxLength": 420, - "type": "string" - }, - "plan_usage_limit": { - "description": "Maximum usage allowed within the interval", - "format": "integer", - "type": "integer" - }, - "plan_usage_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "plan_rate_limit_rps": { - "description": "Rate limit in requests per second", - "format": "integer", - "type": "integer" - }, - "plan_application_limit": { - "format": "integer", - "type": "integer" - } - }, - "type": "object" - }, - "portal_applications": { - "description": "Applications created within portal accounts with their own rate limits and settings", - "required": [ - "portal_application_id", - "portal_account_id" - ], - "properties": { - "portal_application_id": { - "default": "gen_random_uuid()", - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_account_id": { - "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_application_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "emoji": { - "format": "character varying", - "maxLength": 16, - "type": "string" - }, - "portal_application_user_limit": { - "format": "integer", - "type": "integer" - }, - "portal_application_user_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "portal_application_user_limit_rps": { - "format": "integer", - "type": "integer" - }, - "portal_application_description": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "favorite_service_ids": { - "format": "character varying[]", - "items": { - "type": "string" - }, - "type": "array" - }, - "secret_key_hash": { - "description": "Hashed secret key for application authentication", - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "secret_key_required": { - "default": false, - - "type": "boolean" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "services": { - "description": "Supported blockchain services from the Pocket Network", - "required": [ - "service_id", - "service_name", - "service_domains" - ], - "properties": { - "service_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "service_name": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "compute_units_per_relay": { - "description": "Cost in compute units for each relay", - "format": "integer", - "type": "integer" - }, - "service_domains": { - "description": "Valid domains for this service", - "format": "character varying[]", - "items": { - "type": "string" - }, - "type": "array" - }, - "service_owner_address": { - "format": "character varying", - "maxLength": 50, - "type": "string" - }, - "network_id": { - "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "active": { - "default": false, - - "type": "boolean" - }, - "beta": { - "default": false, - - "type": "boolean" - }, - "coming_soon": { - "default": false, - - "type": "boolean" - }, - "quality_fallback_enabled": { - "default": false, - - "type": "boolean" - }, - "hard_fallback_enabled": { - "default": false, - - "type": "boolean" - }, - "svg_icon": { - "format": "text", - "type": "string" - }, - "public_endpoint_url": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "status_endpoint_url": { - "format": "character varying", - "maxLength": 169, - "type": "string" - }, - "status_query": { - "format": "text", - "type": "string" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "portal_accounts": { - "description": "Multi-tenant accounts with plans and billing integration", - "required": [ - "portal_account_id", - "portal_plan_type" - ], - "properties": { - "portal_account_id": { - "default": "gen_random_uuid()", - "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "organization_id": { - "description": "Note:\nThis is a Foreign Key to `organizations.organization_id`.", - "format": "integer", - "type": "integer" - }, - "portal_plan_type": { - "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "user_account_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "internal_account_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "portal_account_user_limit": { - "format": "integer", - "type": "integer" - }, - "portal_account_user_limit_interval": { - "enum": [ - "day", - "month", - "year" - ], - "format": "public.plan_interval", - "type": "string" - }, - "portal_account_user_limit_rps": { - "format": "integer", - "type": "integer" - }, - "billing_type": { - "format": "character varying", - "maxLength": 20, - "type": "string" - }, - "stripe_subscription_id": { - "description": "Stripe subscription identifier for billing", - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "gcp_account_id": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "gcp_entitlement_id": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "deleted_at": { - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "organizations": { - "description": "Companies or customer groups that can be attached to Portal Accounts", - "required": [ - "organization_id", - "organization_name" - ], - "properties": { - "organization_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "organization_name": { - "description": "Name of the organization", - "format": "character varying", - "maxLength": 69, - "type": "string" - }, - "deleted_at": { - "description": "Soft delete timestamp", - "format": "timestamp with time zone", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - }, - "networks": { - "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", - "required": [ - "network_id" - ], - "properties": { - "network_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 42, - "type": "string" - } - }, - "type": "object" - }, - "portal_workers_account_data": { - "description": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", - "properties": { - "portal_account_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "user_account_name": { - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "portal_plan_type": { - "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "billing_type": { - "format": "character varying", - "maxLength": 20, - "type": "string" - }, - "portal_account_user_limit": { - "format": "integer", - "type": "integer" - }, - "gcp_entitlement_id": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "owner_email": { - "format": "character varying", - "maxLength": 255, - "type": "string" - }, - "owner_user_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "character varying", - "maxLength": 36, - "type": "string" - } - }, - "type": "object" - }, - "portal_account_rbac": { - "description": "User roles and permissions for specific portal accounts", - "required": [ - "id", - "portal_account_id", - "portal_user_id", - "role_name" - ], - "properties": { - "id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "portal_account_id": { - "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "portal_user_id": { - "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", - "format": "character varying", - "maxLength": 36, - "type": "string" - }, - "role_name": { - "format": "character varying", - "maxLength": 20, - "type": "string" - }, - "user_joined_account": { - "default": false, - - "type": "boolean" - } - }, - "type": "object" - }, - "service_endpoints": { - "description": "Available endpoint types for each service", - "required": [ - "endpoint_id", - "service_id" - ], - "properties": { - "endpoint_id": { - "description": "Note:\nThis is a Primary Key.", - "format": "integer", - "type": "integer" - }, - "service_id": { - "description": "Note:\nThis is a Foreign Key to `services.service_id`.", - "format": "character varying", - "maxLength": 42, - "type": "string" - }, - "endpoint_type": { - "enum": [ - "cometBFT", - "cosmos", - "REST", - "JSON-RPC", - "WSS", - "gRPC" - ], - "format": "public.endpoint_type", - "type": "string" - }, - "created_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - }, - "updated_at": { - "default": "CURRENT_TIMESTAMP", - "format": "timestamp with time zone", - "type": "string" - } - }, - "type": "object" - } } } } \ No newline at end of file diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go index 6a213fcc6..a28dafdc2 100644 --- a/portal-db/sdk/go/client.go +++ b/portal-db/sdk/go/client.go @@ -96,177 +96,6 @@ type ClientInterface interface { // Get request Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteNetworks request - DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetNetworks request - GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchNetworksWithBody request with any body - PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostNetworksWithBody request with any body - PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteOrganizations request - DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizations request - GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchOrganizationsWithBody request with any body - PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationsWithBody request with any body - PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalAccountRbac request - DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalAccountRbac request - GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalAccountRbacWithBody request with any body - PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalAccountRbacWithBody request with any body - PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalAccounts request - DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalAccounts request - GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalAccountsWithBody request with any body - PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalAccountsWithBody request with any body - PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalApplicationRbac request - DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalApplicationRbac request - GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalApplicationRbacWithBody request with any body - PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalApplicationRbacWithBody request with any body - PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalApplications request - DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalApplications request - GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalApplicationsWithBody request with any body - PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalApplicationsWithBody request with any body - PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeletePortalPlans request - DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalPlans request - GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchPortalPlansWithBody request with any body - PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostPortalPlansWithBody request with any body - PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetPortalWorkersAccountData request - GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetRpcArmor request GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -338,78 +167,6 @@ type ClientInterface interface { PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceEndpoints request - DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceEndpoints request - GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceEndpointsWithBody request with any body - PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceEndpointsWithBody request with any body - PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServiceFallbacks request - DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServiceFallbacks request - GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServiceFallbacksWithBody request with any body - PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServiceFallbacksWithBody request with any body - PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteServices request - DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetServices request - GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchServicesWithBody request with any body - PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostServicesWithBody request with any body - PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -424,8 +181,8 @@ func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http. return c.Client.Do(req) } -func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteNetworksRequest(c.Server, params) +func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcArmorRequest(c.Server, params) if err != nil { return nil, err } @@ -436,8 +193,8 @@ func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParam return c.Client.Do(req) } -func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetNetworksRequest(c.Server, params) +func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -448,8 +205,8 @@ func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, req return c.Client.Do(req) } -func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequest(c.Server, params, body) if err != nil { return nil, err } @@ -460,8 +217,8 @@ func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetwork return c.Client.Do(req) } -func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequest(c.Server, params, body) +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -472,8 +229,8 @@ func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, return c.Client.Do(req) } -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -484,8 +241,8 @@ func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx cont return c.Client.Do(req) } -func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcDearmorRequest(c.Server, params) if err != nil { return nil, err } @@ -496,8 +253,8 @@ func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStripped return c.Client.Do(req) } -func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -508,8 +265,8 @@ func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksP return c.Client.Do(req) } -func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequest(c.Server, params, body) +func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequest(c.Server, params, body) if err != nil { return nil, err } @@ -520,8 +277,8 @@ func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, b return c.Client.Do(req) } -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -532,8 +289,8 @@ func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx conte return c.Client.Do(req) } -func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -544,8 +301,8 @@ func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedB return c.Client.Do(req) } -func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteOrganizationsRequest(c.Server, params) +func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenRandomUuidRequest(c.Server) if err != nil { return nil, err } @@ -556,8 +313,8 @@ func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganiza return c.Client.Do(req) } -func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationsRequest(c.Server, params) +func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -568,8 +325,8 @@ func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsP return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequest(c.Server, params, body) if err != nil { return nil, err } @@ -580,8 +337,8 @@ func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOr return c.Client.Do(req) } -func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequest(c.Server, params, body) +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -592,8 +349,8 @@ func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizati return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -604,8 +361,8 @@ func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenSaltRequest(c.Server, params) if err != nil { return nil, err } @@ -616,8 +373,8 @@ func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStr return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -628,8 +385,8 @@ func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrga return c.Client.Do(req) } -func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequest(c.Server, params, body) +func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequest(c.Server, params, body) if err != nil { return nil, err } @@ -640,8 +397,8 @@ func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganization return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -652,8 +409,8 @@ func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx return c.Client.Do(req) } -func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -664,8 +421,8 @@ func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStri return c.Client.Do(req) } -func (c *Client) DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalAccountRbacRequest(c.Server, params) +func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpArmorHeadersRequest(c.Server, params) if err != nil { return nil, err } @@ -676,8 +433,8 @@ func (c *Client) DeletePortalAccountRbac(ctx context.Context, params *DeletePort return c.Client.Do(req) } -func (c *Client) GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalAccountRbacRequest(c.Server, params) +func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -688,8 +445,8 @@ func (c *Client) GetPortalAccountRbac(ctx context.Context, params *GetPortalAcco return c.Client.Do(req) } -func (c *Client) PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequest(c.Server, params, body) if err != nil { return nil, err } @@ -700,8 +457,8 @@ func (c *Client) PatchPortalAccountRbacWithBody(ctx context.Context, params *Pat return c.Client.Do(req) } -func (c *Client) PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountRbacRequest(c.Server, params, body) +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -712,8 +469,8 @@ func (c *Client) PatchPortalAccountRbac(ctx context.Context, params *PatchPortal return c.Client.Do(req) } -func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -724,8 +481,8 @@ func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody return c.Client.Do(req) } -func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpKeyIdRequest(c.Server, params) if err != nil { return nil, err } @@ -736,8 +493,8 @@ func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNull return c.Client.Do(req) } -func (c *Client) PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -748,8 +505,8 @@ func (c *Client) PostPortalAccountRbacWithBody(ctx context.Context, params *Post return c.Client.Do(req) } -func (c *Client) PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountRbacRequest(c.Server, params, body) +func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequest(c.Server, params, body) if err != nil { return nil, err } @@ -760,8 +517,8 @@ func (c *Client) PostPortalAccountRbac(ctx context.Context, params *PostPortalAc return c.Client.Do(req) } -func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -772,8 +529,8 @@ func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody( return c.Client.Do(req) } -func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -784,13173 +541,1409 @@ func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNulls return c.Client.Do(req) } -func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalAccountsRequest(c.Server, params) +// NewGetRequest generates requests for Get +func NewGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalAccountsRequest(c.Server, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) +// NewGetRpcArmorRequest generates requests for GetRpcArmor +func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/armor") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequest(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewPostRpcArmorRequest calls the generic PostRpcArmor builder with application/json body +func NewPostRpcArmorRequest(server string, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequest(c.Server, params, body) +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcArmorRequestWithBody generates requests for PostRpcArmor with any type of body +func NewPostRpcArmorRequestWithBody(server string, params *PostRpcArmorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/armor") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalApplicationRbacRequest(c.Server, params) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalApplicationRbacRequest(c.Server, params) +// NewGetRpcDearmorRequest generates requests for GetRpcDearmor +func NewGetRpcDearmorRequest(server string, params *GetRpcDearmorParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationRbacRequest(c.Server, params, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcDearmorRequest calls the generic PostRpcDearmor builder with application/json body +func NewPostRpcDearmorRequest(server string, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationRbacRequest(c.Server, params, body) +// NewPostRpcDearmorRequestWithBody generates requests for PostRpcDearmor with any type of body +func NewPostRpcDearmorRequestWithBody(server string, params *PostRpcDearmorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalApplicationsRequest(c.Server, params) +// NewGetRpcGenRandomUuidRequest generates requests for GetRpcGenRandomUuid +func NewGetRpcGenRandomUuidRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalApplicationsRequest(c.Server, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) +// NewPostRpcGenRandomUuidRequest calls the generic PostRpcGenRandomUuid builder with application/json body +func NewPostRpcGenRandomUuidRequest(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) +// NewPostRpcGenRandomUuidRequestWithBody generates requests for PostRpcGenRandomUuid with any type of body +func NewPostRpcGenRandomUuidRequestWithBody(server string, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequest(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewGetRpcGenSaltRequest generates requests for GetRpcGenSalt +func NewGetRpcGenSaltRequest(server string, params *GetRpcGenSaltParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/gen_salt") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePortalPlansRequest(c.Server, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalPlansRequest(c.Server, params) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) +// NewPostRpcGenSaltRequest calls the generic PostRpcGenSalt builder with application/json body +func NewPostRpcGenSaltRequest(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequest(c.Server, params, body) +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewPostRpcGenSaltRequestWithBody generates requests for PostRpcGenSalt with any type of body +func NewPostRpcGenSaltRequestWithBody(server string, params *PostRpcGenSaltParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/gen_salt") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequest(c.Server, params, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewGetRpcPgpArmorHeadersRequest generates requests for GetRpcPgpArmorHeaders +func NewGetRpcPgpArmorHeadersRequest(server string, params *GetRpcPgpArmorHeadersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPortalWorkersAccountDataRequest(c.Server, params) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcArmorRequest(c.Server, params) +// NewPostRpcPgpArmorHeadersRequest calls the generic PostRpcPgpArmorHeaders builder with application/json body +func NewPostRpcPgpArmorHeadersRequest(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithBody(c.Server, params, contentType, body) +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequest(c.Server, params, body) +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcPgpArmorHeadersRequestWithBody generates requests for PostRpcPgpArmorHeaders with any type of body +func NewPostRpcPgpArmorHeadersRequestWithBody(server string, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcDearmorRequest(c.Server, params) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} + req.Header.Add("Content-Type", contentType) -func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } -func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewGetRpcPgpKeyIdRequest generates requests for GetRpcPgpKeyId +func NewGetRpcPgpKeyIdRequest(server string, params *GetRpcPgpKeyIdParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/pgp_key_id") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcGenRandomUuidRequest(c.Server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithBody(c.Server, params, contentType, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequest(c.Server, params, body) +// NewPostRpcPgpKeyIdRequest calls the generic PostRpcPgpKeyId builder with application/json body +func NewPostRpcPgpKeyIdRequest(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/json", bodyReader) } -func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) } -func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) } -func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcGenSaltRequest(c.Server, params) +// NewPostRpcPgpKeyIdRequestWithBody generates requests for PostRpcPgpKeyId with any type of body +func NewPostRpcPgpKeyIdRequestWithBody(server string, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/rpc/pgp_key_id") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithBody(c.Server, params, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequest(c.Server, params, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } } - return c.Client.Do(req) + return nil } -func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface } -func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcPgpArmorHeadersRequest(c.Server, params) +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + return &ClientWithResponses{client}, nil } -func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil } - return c.Client.Do(req) } -func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcPgpKeyIdRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceEndpointsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServiceFallbacksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetServicesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewGetRequest generates requests for Get -func NewGetRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteNetworksRequest generates requests for DeleteNetworks -func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetNetworksRequest generates requests for GetNetworks -func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body -func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body -func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body -func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body -func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations -func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetOrganizationsRequest generates requests for GetOrganizations -func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body -func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body -func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body -func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body -func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalAccountRbacRequest generates requests for DeletePortalAccountRbac -func NewDeletePortalAccountRbacRequest(server string, params *DeletePortalAccountRbacParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_account_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.RoleName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserJoinedAccount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalAccountRbacRequest generates requests for GetPortalAccountRbac -func NewGetPortalAccountRbacRequest(server string, params *GetPortalAccountRbacParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_account_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.RoleName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserJoinedAccount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalAccountRbacRequest calls the generic PatchPortalAccountRbac builder with application/json body -func NewPatchPortalAccountRbacRequest(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json body -func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalAccountRbacRequestWithBody generates requests for PatchPortalAccountRbac with any type of body -func NewPatchPortalAccountRbacRequestWithBody(server string, params *PatchPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_account_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.RoleName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserJoinedAccount != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalAccountRbacRequest calls the generic PostPortalAccountRbac builder with application/json body -func NewPostPortalAccountRbacRequest(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json body -func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalAccountRbacRequestWithBody generates requests for PostPortalAccountRbac with any type of body -func NewPostPortalAccountRbacRequestWithBody(server string, params *PostPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_account_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts -func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalAccountsRequest generates requests for GetPortalAccounts -func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body -func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body -func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InternalAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StripeSubscriptionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body -func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body -func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalApplicationRbacRequest generates requests for DeletePortalApplicationRbac -func NewDeletePortalApplicationRbacRequest(server string, params *DeletePortalApplicationRbacParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_application_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalApplicationRbacRequest generates requests for GetPortalApplicationRbac -func NewGetPortalApplicationRbacRequest(server string, params *GetPortalApplicationRbacParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_application_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalApplicationRbacRequest calls the generic PatchPortalApplicationRbac builder with application/json body -func NewPatchPortalApplicationRbacRequest(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json body -func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalApplicationRbacRequestWithBody generates requests for PatchPortalApplicationRbac with any type of body -func NewPatchPortalApplicationRbacRequestWithBody(server string, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_application_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalApplicationRbacRequest calls the generic PostPortalApplicationRbac builder with application/json body -func NewPostPortalApplicationRbacRequest(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json body -func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalApplicationRbacRequestWithBody generates requests for PostPortalApplicationRbac with any type of body -func NewPostPortalApplicationRbacRequestWithBody(server string, params *PostPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_application_rbac") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications -func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalApplicationsRequest generates requests for GetPortalApplications -func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body -func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body -func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalApplicationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Emoji != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationUserLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalApplicationDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FavoriteServiceIds != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyHash != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretKeyRequired != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body -func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body -func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_applications") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeletePortalPlansRequest generates requests for DeletePortalPlans -func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalPlansRequest generates requests for GetPortalPlans -func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body -func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body -func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanTypeDescription != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanUsageLimitInterval != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanRateLimitRps != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PlanApplicationLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body -func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body -func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_plans") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetPortalWorkersAccountDataRequest generates requests for GetPortalWorkersAccountData -func NewGetPortalWorkersAccountDataRequest(server string, params *GetPortalWorkersAccountDataParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/portal_workers_account_data") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PortalAccountId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UserAccountName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalPlanType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.BillingType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PortalAccountUserLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GcpEntitlementId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OwnerEmail != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_email", runtime.ParamLocationQuery, *params.OwnerEmail); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OwnerUserId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_user_id", runtime.ParamLocationQuery, *params.OwnerUserId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewGetRpcArmorRequest generates requests for GetRpcArmor -func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/armor") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcArmorRequest calls the generic PostRpcArmor builder with application/json body -func NewPostRpcArmorRequest(server string, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json body -func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcArmorRequestWithBody generates requests for PostRpcArmor with any type of body -func NewPostRpcArmorRequestWithBody(server string, params *PostRpcArmorParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/armor") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcDearmorRequest generates requests for GetRpcDearmor -func NewGetRpcDearmorRequest(server string, params *GetRpcDearmorParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/dearmor") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcDearmorRequest calls the generic PostRpcDearmor builder with application/json body -func NewPostRpcDearmorRequest(server string, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json body -func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcDearmorRequestWithBody generates requests for PostRpcDearmor with any type of body -func NewPostRpcDearmorRequestWithBody(server string, params *PostRpcDearmorParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/dearmor") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcGenRandomUuidRequest generates requests for GetRpcGenRandomUuid -func NewGetRpcGenRandomUuidRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/gen_random_uuid") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcGenRandomUuidRequest calls the generic PostRpcGenRandomUuid builder with application/json body -func NewPostRpcGenRandomUuidRequest(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json body -func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcGenRandomUuidRequestWithBody generates requests for PostRpcGenRandomUuid with any type of body -func NewPostRpcGenRandomUuidRequestWithBody(server string, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/gen_random_uuid") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcGenSaltRequest generates requests for GetRpcGenSalt -func NewGetRpcGenSaltRequest(server string, params *GetRpcGenSaltParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/gen_salt") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcGenSaltRequest calls the generic PostRpcGenSalt builder with application/json body -func NewPostRpcGenSaltRequest(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json body -func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcGenSaltRequestWithBody generates requests for PostRpcGenSalt with any type of body -func NewPostRpcGenSaltRequestWithBody(server string, params *PostRpcGenSaltParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/gen_salt") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcPgpArmorHeadersRequest generates requests for GetRpcPgpArmorHeaders -func NewGetRpcPgpArmorHeadersRequest(server string, params *GetRpcPgpArmorHeadersParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcPgpArmorHeadersRequest calls the generic PostRpcPgpArmorHeaders builder with application/json body -func NewPostRpcPgpArmorHeadersRequest(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json body -func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcPgpArmorHeadersRequestWithBody generates requests for PostRpcPgpArmorHeaders with any type of body -func NewPostRpcPgpArmorHeadersRequestWithBody(server string, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetRpcPgpKeyIdRequest generates requests for GetRpcPgpKeyId -func NewGetRpcPgpKeyIdRequest(server string, params *GetRpcPgpKeyIdParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/pgp_key_id") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostRpcPgpKeyIdRequest calls the generic PostRpcPgpKeyId builder with application/json body -func NewPostRpcPgpKeyIdRequest(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json body -func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostRpcPgpKeyIdRequestWithBody generates requests for PostRpcPgpKeyId with any type of body -func NewPostRpcPgpKeyIdRequestWithBody(server string, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/rpc/pgp_key_id") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints -func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints -func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body -func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body -func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.EndpointId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.EndpointType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body -func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body -func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_endpoints") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks -func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks -func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body -func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body -func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceFallbackId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FallbackUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body -func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body -func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/service_fallbacks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewDeleteServicesRequest generates requests for DeleteServices -func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PublicEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusQuery != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewGetServicesRequest generates requests for GetServices -func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PublicEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusQuery != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Order != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Range != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) - if err != nil { - return nil, err - } - - req.Header.Set("Range", headerParam0) - } - - if params.RangeUnit != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) - if err != nil { - return nil, err - } - - req.Header.Set("Range-Unit", headerParam1) - } - - if params.Prefer != nil { - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam2) - } - - } - - return req, nil -} - -// NewPatchServicesRequest calls the generic PatchServices builder with application/json body -func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body -func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ServiceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComputeUnitsPerRelay != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceDomains != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ServiceOwnerAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Active != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Beta != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ComingSoon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.QualityFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.HardFallbackEnabled != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SvgIcon != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PublicEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusEndpointUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StatusQuery != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DeletedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CreatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UpdatedAt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -// NewPostServicesRequest calls the generic PostServices builder with application/json body -func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) -} - -// NewPostServicesRequestWithBody generates requests for PostServices with any type of body -func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/services") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Select != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetWithResponse request - GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) - - // DeleteNetworksWithResponse request - DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) - - // GetNetworksWithResponse request - GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) - - // PatchNetworksWithBodyWithResponse request with any body - PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) - - // PostNetworksWithBodyWithResponse request with any body - PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) - - // DeleteOrganizationsWithResponse request - DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) - - // GetOrganizationsWithResponse request - GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) - - // PatchOrganizationsWithBodyWithResponse request with any body - PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) - - // PostOrganizationsWithBodyWithResponse request with any body - PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) - - // DeletePortalAccountRbacWithResponse request - DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) - - // GetPortalAccountRbacWithResponse request - GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) - - // PatchPortalAccountRbacWithBodyWithResponse request with any body - PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) - - PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) - - PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) - - PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) - - // PostPortalAccountRbacWithBodyWithResponse request with any body - PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) - - PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) - - PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) - - PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) - - // DeletePortalAccountsWithResponse request - DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) - - // GetPortalAccountsWithResponse request - GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) - - // PatchPortalAccountsWithBodyWithResponse request with any body - PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) - - // PostPortalAccountsWithBodyWithResponse request with any body - PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) - - // DeletePortalApplicationRbacWithResponse request - DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) - - // GetPortalApplicationRbacWithResponse request - GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) - - // PatchPortalApplicationRbacWithBodyWithResponse request with any body - PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) - - PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) - - PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) - - PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) - - // PostPortalApplicationRbacWithBodyWithResponse request with any body - PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) - - PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) - - PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) - - PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) - - // DeletePortalApplicationsWithResponse request - DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) - - // GetPortalApplicationsWithResponse request - GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) - - // PatchPortalApplicationsWithBodyWithResponse request with any body - PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) - - // PostPortalApplicationsWithBodyWithResponse request with any body - PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) - - // DeletePortalPlansWithResponse request - DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) - - // GetPortalPlansWithResponse request - GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) - - // PatchPortalPlansWithBodyWithResponse request with any body - PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) - - // PostPortalPlansWithBodyWithResponse request with any body - PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) - - // GetPortalWorkersAccountDataWithResponse request - GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) - - // GetRpcArmorWithResponse request - GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) - - // PostRpcArmorWithBodyWithResponse request with any body - PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - - PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - - PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - - PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - - // GetRpcDearmorWithResponse request - GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) - - // PostRpcDearmorWithBodyWithResponse request with any body - PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - - PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - - PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - - PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - - // GetRpcGenRandomUuidWithResponse request - GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) - - // PostRpcGenRandomUuidWithBodyWithResponse request with any body - PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - - PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - - PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - - PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - - // GetRpcGenSaltWithResponse request - GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) - - // PostRpcGenSaltWithBodyWithResponse request with any body - PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - - PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - - PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - - PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - - // GetRpcPgpArmorHeadersWithResponse request - GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) - - // PostRpcPgpArmorHeadersWithBodyWithResponse request with any body - PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - - PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - - PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - - PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - - // GetRpcPgpKeyIdWithResponse request - GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) - - // PostRpcPgpKeyIdWithBodyWithResponse request with any body - PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - - PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - - PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - - PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - - // DeleteServiceEndpointsWithResponse request - DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) - - // GetServiceEndpointsWithResponse request - GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) - - // PatchServiceEndpointsWithBodyWithResponse request with any body - PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) - - // PostServiceEndpointsWithBodyWithResponse request with any body - PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) - - // DeleteServiceFallbacksWithResponse request - DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) - - // GetServiceFallbacksWithResponse request - GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) - - // PatchServiceFallbacksWithBodyWithResponse request with any body - PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) - - // PostServiceFallbacksWithBodyWithResponse request with any body - PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) - - // DeleteServicesWithResponse request - DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) - - // GetServicesWithResponse request - GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) - - // PatchServicesWithBodyWithResponse request with any body - PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) - - // PostServicesWithBodyWithResponse request with any body - PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) - - PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) -} - -type GetResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetNetworksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Networks - ApplicationvndPgrstObjectJSON200 *[]Networks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks -} - -// Status returns HTTPResponse.Status -func (r GetNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostNetworksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Organizations - ApplicationvndPgrstObjectJSON200 *[]Organizations - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalAccountRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalAccountRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalAccountRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalAccountRbacResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalAccountRbac - ApplicationvndPgrstObjectJSON200 *[]PortalAccountRbac - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccountRbac -} - -// Status returns HTTPResponse.Status -func (r GetPortalAccountRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalAccountRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalAccountRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalAccountRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalAccountRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalAccountRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalAccountRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalAccountRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSON200 *[]PortalAccounts - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts -} - -// Status returns HTTPResponse.Status -func (r GetPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalAccountsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalApplicationRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalApplicationRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalApplicationRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalApplicationRbacResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalApplicationRbac - ApplicationvndPgrstObjectJSON200 *[]PortalApplicationRbac - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplicationRbac -} - -// Status returns HTTPResponse.Status -func (r GetPortalApplicationRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalApplicationRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalApplicationRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalApplicationRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalApplicationRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalApplicationRbacResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalApplicationRbacResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalApplicationRbacResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSON200 *[]PortalApplications - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications -} - -// Status returns HTTPResponse.Status -func (r GetPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalApplicationsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalApplicationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalApplicationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeletePortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSON200 *[]PortalPlans - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans -} - -// Status returns HTTPResponse.Status -func (r GetPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostPortalPlansResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostPortalPlansResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostPortalPlansResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPortalWorkersAccountDataResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]PortalWorkersAccountData - ApplicationvndPgrstObjectJSON200 *[]PortalWorkersAccountData - ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalWorkersAccountData -} - -// Status returns HTTPResponse.Status -func (r GetPortalWorkersAccountDataResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPortalWorkersAccountDataResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcArmorResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcArmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcArmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcArmorResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcArmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcArmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcDearmorResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcDearmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcDearmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcDearmorResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcDearmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcDearmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcGenRandomUuidResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcGenRandomUuidResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcGenRandomUuidResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcGenRandomUuidResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcGenRandomUuidResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcGenRandomUuidResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcGenSaltResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcGenSaltResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcGenSaltResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcGenSaltResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcGenSaltResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcGenSaltResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcPgpArmorHeadersResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcPgpArmorHeadersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcPgpArmorHeadersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcPgpArmorHeadersResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcPgpArmorHeadersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcPgpArmorHeadersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetRpcPgpKeyIdResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r GetRpcPgpKeyIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcPgpKeyIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostRpcPgpKeyIdResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostRpcPgpKeyIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcPgpKeyIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints -} - -// Status returns HTTPResponse.Status -func (r GetServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceEndpointsResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceEndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceEndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks - ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks -} - -// Status returns HTTPResponse.Status -func (r GetServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServiceFallbacksResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServiceFallbacksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServiceFallbacksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r DeleteServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetServicesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Services - ApplicationvndPgrstObjectJSON200 *[]Services - ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services -} - -// Status returns HTTPResponse.Status -func (r GetServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PatchServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostServicesResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r PostServicesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostServicesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// GetWithResponse request returning *GetResponse -func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { - rsp, err := c.Get(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetResponse(rsp) -} - -// DeleteNetworksWithResponse request returning *DeleteNetworksResponse -func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { - rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteNetworksResponse(rsp) -} - -// GetNetworksWithResponse request returning *GetNetworksResponse -func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { - rsp, err := c.GetNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetNetworksResponse(rsp) -} - -// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse -func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { - rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchNetworksResponse(rsp) -} - -// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse -func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { - rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostNetworksResponse(rsp) -} - -// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse -func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { - rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteOrganizationsResponse(rsp) -} - -// GetOrganizationsWithResponse request returning *GetOrganizationsResponse -func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { - rsp, err := c.GetOrganizations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationsResponse(rsp) -} - -// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse -func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { - rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchOrganizationsResponse(rsp) -} - -// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse -func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { - rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationsResponse(rsp) -} - -// DeletePortalAccountRbacWithResponse request returning *DeletePortalAccountRbacResponse -func (c *ClientWithResponses) DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) { - rsp, err := c.DeletePortalAccountRbac(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalAccountRbacResponse(rsp) -} - -// GetPortalAccountRbacWithResponse request returning *GetPortalAccountRbacResponse -func (c *ClientWithResponses) GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) { - rsp, err := c.GetPortalAccountRbac(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalAccountRbacResponse(rsp) -} - -// PatchPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountRbacResponse -func (c *ClientWithResponses) PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { - rsp, err := c.PatchPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { - rsp, err := c.PatchPortalAccountRbac(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { - rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { - rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountRbacResponse(rsp) -} - -// PostPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PostPortalAccountRbacResponse -func (c *ClientWithResponses) PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { - rsp, err := c.PostPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { - rsp, err := c.PostPortalAccountRbac(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { - rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { - rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountRbacResponse(rsp) -} - -// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse -func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { - rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalAccountsResponse(rsp) -} - -// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse -func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { - rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalAccountsResponse(rsp) -} - -// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse -func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { - rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalAccountsResponse(rsp) -} - -// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse -func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { - rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalAccountsResponse(rsp) -} - -// DeletePortalApplicationRbacWithResponse request returning *DeletePortalApplicationRbacResponse -func (c *ClientWithResponses) DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) { - rsp, err := c.DeletePortalApplicationRbac(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalApplicationRbacResponse(rsp) -} - -// GetPortalApplicationRbacWithResponse request returning *GetPortalApplicationRbacResponse -func (c *ClientWithResponses) GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) { - rsp, err := c.GetPortalApplicationRbac(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalApplicationRbacResponse(rsp) -} - -// PatchPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationRbacResponse -func (c *ClientWithResponses) PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { - rsp, err := c.PatchPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { - rsp, err := c.PatchPortalApplicationRbac(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { - rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { - rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationRbacResponse(rsp) -} - -// PostPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationRbacResponse -func (c *ClientWithResponses) PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { - rsp, err := c.PostPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { - rsp, err := c.PostPortalApplicationRbac(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { - rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationRbacResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { - rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationRbacResponse(rsp) -} - -// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse -func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { - rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalApplicationsResponse(rsp) -} - -// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse -func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { - rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalApplicationsResponse(rsp) -} - -// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse -func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { - rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalApplicationsResponse(rsp) -} - -// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse -func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { - rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalApplicationsResponse(rsp) -} - -// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse -func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { - rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePortalPlansResponse(rsp) -} - -// GetPortalPlansWithResponse request returning *GetPortalPlansResponse -func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { - rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalPlansResponse(rsp) -} - -// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse -func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { - rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchPortalPlansResponse(rsp) -} - -// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse -func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { - rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostPortalPlansResponse(rsp) -} - -// GetPortalWorkersAccountDataWithResponse request returning *GetPortalWorkersAccountDataResponse -func (c *ClientWithResponses) GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) { - rsp, err := c.GetPortalWorkersAccountData(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPortalWorkersAccountDataResponse(rsp) -} - -// GetRpcArmorWithResponse request returning *GetRpcArmorResponse -func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { - rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcArmorResponse(rsp) -} - -// PostRpcArmorWithBodyWithResponse request with arbitrary body returning *PostRpcArmorResponse -func (c *ClientWithResponses) PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcArmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmor(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcArmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcArmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcArmorResponse(rsp) -} - -// GetRpcDearmorWithResponse request returning *GetRpcDearmorResponse -func (c *ClientWithResponses) GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) { - rsp, err := c.GetRpcDearmor(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcDearmorResponse(rsp) -} - -// PostRpcDearmorWithBodyWithResponse request with arbitrary body returning *PostRpcDearmorResponse -func (c *ClientWithResponses) PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcDearmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmor(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcDearmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcDearmorResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcDearmorResponse(rsp) -} - -// GetRpcGenRandomUuidWithResponse request returning *GetRpcGenRandomUuidResponse -func (c *ClientWithResponses) GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) { - rsp, err := c.GetRpcGenRandomUuid(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcGenRandomUuidResponse(rsp) -} - -// PostRpcGenRandomUuidWithBodyWithResponse request with arbitrary body returning *PostRpcGenRandomUuidResponse -func (c *ClientWithResponses) PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenRandomUuidResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuid(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenRandomUuidResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenRandomUuidResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenRandomUuidResponse(rsp) -} - -// GetRpcGenSaltWithResponse request returning *GetRpcGenSaltResponse -func (c *ClientWithResponses) GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) { - rsp, err := c.GetRpcGenSalt(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcGenSaltResponse(rsp) -} - -// PostRpcGenSaltWithBodyWithResponse request with arbitrary body returning *PostRpcGenSaltResponse -func (c *ClientWithResponses) PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenSaltResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSalt(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenSaltResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenSaltResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcGenSaltResponse(rsp) -} - -// GetRpcPgpArmorHeadersWithResponse request returning *GetRpcPgpArmorHeadersResponse -func (c *ClientWithResponses) GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) { - rsp, err := c.GetRpcPgpArmorHeaders(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcPgpArmorHeadersResponse(rsp) -} - -// PostRpcPgpArmorHeadersWithBodyWithResponse request with arbitrary body returning *PostRpcPgpArmorHeadersResponse -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeaders(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} - -// GetRpcPgpKeyIdWithResponse request returning *GetRpcPgpKeyIdResponse -func (c *ClientWithResponses) GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) { - rsp, err := c.GetRpcPgpKeyId(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRpcPgpKeyIdResponse(rsp) -} - -// PostRpcPgpKeyIdWithBodyWithResponse request with arbitrary body returning *PostRpcPgpKeyIdResponse -func (c *ClientWithResponses) PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpKeyIdResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyId(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpKeyIdResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpKeyIdResponse(rsp) -} - -func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostRpcPgpKeyIdResponse(rsp) -} - -// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse -func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { - rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceEndpointsResponse(rsp) -} - -// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse -func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { - rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceEndpointsResponse(rsp) -} - -// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse -func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { - rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceEndpointsResponse(rsp) -} - -// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse -func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { - rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceEndpointsResponse(rsp) -} - -// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse -func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { - rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServiceFallbacksResponse(rsp) -} - -// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse -func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { - rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServiceFallbacksResponse(rsp) -} - -// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse -func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { - rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServiceFallbacksResponse(rsp) -} - -// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse -func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { - rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServiceFallbacksResponse(rsp) -} - -// DeleteServicesWithResponse request returning *DeleteServicesResponse -func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { - rsp, err := c.DeleteServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteServicesResponse(rsp) -} - -// GetServicesWithResponse request returning *GetServicesResponse -func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { - rsp, err := c.GetServices(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetServicesResponse(rsp) -} - -// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse -func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { - rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchServicesResponse(rsp) -} - -// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse -func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServices(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { - rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostServicesResponse(rsp) -} - -// ParseGetResponse parses an HTTP response from a GetWithResponse call -func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) -// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call -func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + // GetRpcArmorWithResponse request + GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) - response := &DeleteNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + // PostRpcArmorWithBodyWithResponse request with any body + PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - return response, nil -} + PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) -// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call -func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - response := &GetNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + // GetRpcDearmorWithResponse request + GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest + // PostRpcDearmorWithBodyWithResponse request with any body + PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Networks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - } + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) - return response, nil -} + // GetRpcGenRandomUuidWithResponse request + GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) -// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call -func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + // PostRpcGenRandomUuidWithBodyWithResponse request with any body + PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - response := &PatchNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - return response, nil -} + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) -// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call -func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) - response := &PostNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + // GetRpcGenSaltWithResponse request + GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) - return response, nil -} + // PostRpcGenSaltWithBodyWithResponse request with any body + PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) -// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call -func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - response := &DeleteOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) - return response, nil -} + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) -// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call -func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + // GetRpcPgpArmorHeadersWithResponse request + GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) - response := &GetOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + // PostRpcPgpArmorHeadersWithBodyWithResponse request with any body + PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Organizations - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported + // GetRpcPgpKeyIdWithResponse request + GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) - } + // PostRpcPgpKeyIdWithBodyWithResponse request with any body + PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - return response, nil -} + PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) -// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call -func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) - response := &PatchOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) +} - return response, nil +type GetResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call -func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &PostOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type GetRpcArmorResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParseDeletePortalAccountRbacResponse parses an HTTP response from a DeletePortalAccountRbacWithResponse call -func ParseDeletePortalAccountRbacResponse(rsp *http.Response) (*DeletePortalAccountRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetRpcArmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &DeletePortalAccountRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcArmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return response, nil + return 0 } -// ParseGetPortalAccountRbacResponse parses an HTTP response from a GetPortalAccountRbacWithResponse call -func ParseGetPortalAccountRbacResponse(rsp *http.Response) (*GetPortalAccountRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } +type PostRpcArmorResponse struct { + Body []byte + HTTPResponse *http.Response +} - response := &GetPortalAccountRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// Status returns HTTPResponse.Status +func (r PostRpcArmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalAccountRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalAccountRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalAccountRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcArmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type GetRpcDearmorResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParsePatchPortalAccountRbacResponse parses an HTTP response from a PatchPortalAccountRbacWithResponse call -func ParsePatchPortalAccountRbacResponse(rsp *http.Response) (*PatchPortalAccountRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetRpcDearmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &PatchPortalAccountRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcDearmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type PostRpcDearmorResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParsePostPortalAccountRbacResponse parses an HTTP response from a PostPortalAccountRbacWithResponse call -func ParsePostPortalAccountRbacResponse(rsp *http.Response) (*PostPortalAccountRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r PostRpcDearmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &PostPortalAccountRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcDearmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type GetRpcGenRandomUuidResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call -func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetRpcGenRandomUuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &DeletePortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcGenRandomUuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type PostRpcGenRandomUuidResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call -func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r PostRpcGenRandomUuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &GetPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcGenRandomUuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalAccounts - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest +type GetRpcGenSaltResponse struct { + Body []byte + HTTPResponse *http.Response +} - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported +// Status returns HTTPResponse.Status +func (r GetRpcGenSaltResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcGenSaltResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type PostRpcGenSaltResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call -func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r PostRpcGenSaltResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &PatchPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcGenSaltResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type GetRpcPgpArmorHeadersResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call -func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetRpcPgpArmorHeadersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &PostPortalAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcPgpArmorHeadersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type PostRpcPgpArmorHeadersResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParseDeletePortalApplicationRbacResponse parses an HTTP response from a DeletePortalApplicationRbacWithResponse call -func ParseDeletePortalApplicationRbacResponse(rsp *http.Response) (*DeletePortalApplicationRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r PostRpcPgpArmorHeadersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &DeletePortalApplicationRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcPgpArmorHeadersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type GetRpcPgpKeyIdResponse struct { + Body []byte + HTTPResponse *http.Response } -// ParseGetPortalApplicationRbacResponse parses an HTTP response from a GetPortalApplicationRbacWithResponse call -func ParseGetPortalApplicationRbacResponse(rsp *http.Response) (*GetPortalApplicationRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetRpcPgpKeyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &GetPortalApplicationRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcPgpKeyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalApplicationRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalApplicationRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalApplicationRbac - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported +type PostRpcPgpKeyIdResponse struct { + Body []byte + HTTPResponse *http.Response +} +// Status returns HTTPResponse.Status +func (r PostRpcPgpKeyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - return response, nil +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcPgpKeyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -// ParsePatchPortalApplicationRbacResponse parses an HTTP response from a PatchPortalApplicationRbacWithResponse call -func ParsePatchPortalApplicationRbacResponse(rsp *http.Response) (*PatchPortalApplicationRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) if err != nil { return nil, err } - - response := &PatchPortalApplicationRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParseGetResponse(rsp) } -// ParsePostPortalApplicationRbacResponse parses an HTTP response from a PostPortalApplicationRbacWithResponse call -func ParsePostPortalApplicationRbacResponse(rsp *http.Response) (*PostPortalApplicationRbacResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetRpcArmorWithResponse request returning *GetRpcArmorResponse +func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { + rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) if err != nil { return nil, err } - - response := &PostPortalApplicationRbacResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParseGetRpcArmorResponse(rsp) } -// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call -func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// PostRpcArmorWithBodyWithResponse request with arbitrary body returning *PostRpcArmorResponse +func (c *ClientWithResponses) PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - - response := &DeletePortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcArmorResponse(rsp) } -// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call -func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmor(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &GetPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalApplications - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil + return ParsePostRpcArmorResponse(rsp) } -// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call -func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &PatchPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcArmorResponse(rsp) } -// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call -func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &PostPortalApplicationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcArmorResponse(rsp) } -// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call -func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetRpcDearmorWithResponse request returning *GetRpcDearmorResponse +func (c *ClientWithResponses) GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) { + rsp, err := c.GetRpcDearmor(ctx, params, reqEditors...) if err != nil { return nil, err } - - response := &DeletePortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParseGetRpcDearmorResponse(rsp) } -// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call -func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// PostRpcDearmorWithBodyWithResponse request with arbitrary body returning *PostRpcDearmorResponse +func (c *ClientWithResponses) PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - - response := &GetPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalPlans - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil + return ParsePostRpcDearmorResponse(rsp) } -// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call -func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmor(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &PatchPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcDearmorResponse(rsp) } -// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call -func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &PostPortalPlansResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcDearmorResponse(rsp) } -// ParseGetPortalWorkersAccountDataResponse parses an HTTP response from a GetPortalWorkersAccountDataWithResponse call -func ParseGetPortalWorkersAccountDataResponse(rsp *http.Response) (*GetPortalWorkersAccountDataResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } - - response := &GetPortalWorkersAccountDataResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []PortalWorkersAccountData - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []PortalWorkersAccountData - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []PortalWorkersAccountData - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - - return response, nil + return ParsePostRpcDearmorResponse(rsp) } -// ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call -func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetRpcGenRandomUuidWithResponse request returning *GetRpcGenRandomUuidResponse +func (c *ClientWithResponses) GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) { + rsp, err := c.GetRpcGenRandomUuid(ctx, reqEditors...) if err != nil { return nil, err } - - response := &GetRpcArmorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParseGetRpcGenRandomUuidResponse(rsp) } -// ParsePostRpcArmorResponse parses an HTTP response from a PostRpcArmorWithResponse call -func ParsePostRpcArmorResponse(rsp *http.Response) (*PostRpcArmorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// PostRpcGenRandomUuidWithBodyWithResponse request with arbitrary body returning *PostRpcGenRandomUuidResponse +func (c *ClientWithResponses) PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - - response := &PostRpcArmorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil + return ParsePostRpcGenRandomUuidResponse(rsp) } -// ParseGetRpcDearmorResponse parses an HTTP response from a GetRpcDearmorWithResponse call -func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuid(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcGenRandomUuidResponse(rsp) +} - response := &GetRpcDearmorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcGenRandomUuidResponse(rsp) } -// ParsePostRpcDearmorResponse parses an HTTP response from a PostRpcDearmorWithResponse call -func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcGenRandomUuidResponse(rsp) +} - response := &PostRpcDearmorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// GetRpcGenSaltWithResponse request returning *GetRpcGenSaltResponse +func (c *ClientWithResponses) GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) { + rsp, err := c.GetRpcGenSalt(ctx, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetRpcGenSaltResponse(rsp) } -// ParseGetRpcGenRandomUuidResponse parses an HTTP response from a GetRpcGenRandomUuidWithResponse call -func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// PostRpcGenSaltWithBodyWithResponse request with arbitrary body returning *PostRpcGenSaltResponse +func (c *ClientWithResponses) PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcGenSaltResponse(rsp) +} - response := &GetRpcGenRandomUuidResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSalt(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcGenSaltResponse(rsp) } -// ParsePostRpcGenRandomUuidResponse parses an HTTP response from a PostRpcGenRandomUuidWithResponse call -func ParsePostRpcGenRandomUuidResponse(rsp *http.Response) (*PostRpcGenRandomUuidResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcGenSaltResponse(rsp) +} - response := &PostRpcGenRandomUuidResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcGenSaltResponse(rsp) } -// ParseGetRpcGenSaltResponse parses an HTTP response from a GetRpcGenSaltWithResponse call -func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetRpcPgpArmorHeadersWithResponse request returning *GetRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) { + rsp, err := c.GetRpcPgpArmorHeaders(ctx, params, reqEditors...) if err != nil { return nil, err } + return ParseGetRpcPgpArmorHeadersResponse(rsp) +} - response := &GetRpcGenSaltResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// PostRpcPgpArmorHeadersWithBodyWithResponse request with arbitrary body returning *PostRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -// ParsePostRpcGenSaltResponse parses an HTTP response from a PostRpcGenSaltWithResponse call -func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeaders(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} - response := &PostRpcGenSaltResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcPgpArmorHeadersResponse(rsp) } -// ParseGetRpcPgpArmorHeadersResponse parses an HTTP response from a GetRpcPgpArmorHeadersWithResponse call -func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHeadersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} - response := &GetRpcPgpArmorHeadersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// GetRpcPgpKeyIdWithResponse request returning *GetRpcPgpKeyIdResponse +func (c *ClientWithResponses) GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) { + rsp, err := c.GetRpcPgpKeyId(ctx, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetRpcPgpKeyIdResponse(rsp) } -// ParsePostRpcPgpArmorHeadersResponse parses an HTTP response from a PostRpcPgpArmorHeadersWithResponse call -func ParsePostRpcPgpArmorHeadersResponse(rsp *http.Response) (*PostRpcPgpArmorHeadersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// PostRpcPgpKeyIdWithBodyWithResponse request with arbitrary body returning *PostRpcPgpKeyIdResponse +func (c *ClientWithResponses) PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcPgpKeyIdResponse(rsp) +} - response := &PostRpcPgpArmorHeadersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyId(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcPgpKeyIdResponse(rsp) } -// ParseGetRpcPgpKeyIdResponse parses an HTTP response from a GetRpcPgpKeyIdWithResponse call -func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) if err != nil { return nil, err } + return ParsePostRpcPgpKeyIdResponse(rsp) +} - response := &GetRpcPgpKeyIdResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParsePostRpcPgpKeyIdResponse(rsp) } -// ParsePostRpcPgpKeyIdResponse parses an HTTP response from a PostRpcPgpKeyIdWithResponse call -func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, error) { +// ParseGetResponse parses an HTTP response from a GetWithResponse call +func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcPgpKeyIdResponse{ + response := &GetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13958,15 +1951,15 @@ func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, return response, nil } -// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call -func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { +// ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call +func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteServiceEndpointsResponse{ + response := &GetRpcArmorResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13974,58 +1967,31 @@ func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndp return response, nil } -// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call -func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { +// ParsePostRpcArmorResponse parses an HTTP response from a PostRpcArmorWithResponse call +func ParsePostRpcArmorResponse(rsp *http.Response) (*PostRpcArmorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetServiceEndpointsResponse{ + response := &PostRpcArmorResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceEndpoints - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - return response, nil } -// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call -func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { +// ParseGetRpcDearmorResponse parses an HTTP response from a GetRpcDearmorWithResponse call +func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchServiceEndpointsResponse{ + response := &GetRpcDearmorResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14033,15 +1999,15 @@ func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpoi return response, nil } -// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call -func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { +// ParsePostRpcDearmorResponse parses an HTTP response from a PostRpcDearmorWithResponse call +func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostServiceEndpointsResponse{ + response := &PostRpcDearmorResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14049,15 +2015,15 @@ func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpoint return response, nil } -// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call -func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { +// ParseGetRpcGenRandomUuidResponse parses an HTTP response from a GetRpcGenRandomUuidWithResponse call +func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteServiceFallbacksResponse{ + response := &GetRpcGenRandomUuidResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14065,58 +2031,31 @@ func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFall return response, nil } -// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call -func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { +// ParsePostRpcGenRandomUuidResponse parses an HTTP response from a PostRpcGenRandomUuidWithResponse call +func ParsePostRpcGenRandomUuidResponse(rsp *http.Response) (*PostRpcGenRandomUuidResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetServiceFallbacksResponse{ + response := &PostRpcGenRandomUuidResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []ServiceFallbacks - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - return response, nil } -// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call -func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { +// ParseGetRpcGenSaltResponse parses an HTTP response from a GetRpcGenSaltWithResponse call +func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchServiceFallbacksResponse{ + response := &GetRpcGenSaltResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14124,15 +2063,15 @@ func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallba return response, nil } -// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call -func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { +// ParsePostRpcGenSaltResponse parses an HTTP response from a PostRpcGenSaltWithResponse call +func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostServiceFallbacksResponse{ + response := &PostRpcGenSaltResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14140,15 +2079,15 @@ func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallback return response, nil } -// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call -func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { +// ParseGetRpcPgpArmorHeadersResponse parses an HTTP response from a GetRpcPgpArmorHeadersWithResponse call +func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHeadersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteServicesResponse{ + response := &GetRpcPgpArmorHeadersResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14156,58 +2095,31 @@ func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, e return response, nil } -// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call -func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { +// ParsePostRpcPgpArmorHeadersResponse parses an HTTP response from a PostRpcPgpArmorHeadersWithResponse call +func ParsePostRpcPgpArmorHeadersResponse(rsp *http.Response) (*PostRpcPgpArmorHeadersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetServicesResponse{ + response := &PostRpcPgpArmorHeadersResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSON200 = &dest - - case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: - var dest []Services - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - - case rsp.StatusCode == 200: - // Content-type (text/csv) unsupported - - } - return response, nil } -// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call -func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { +// ParseGetRpcPgpKeyIdResponse parses an HTTP response from a GetRpcPgpKeyIdWithResponse call +func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchServicesResponse{ + response := &GetRpcPgpKeyIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14215,15 +2127,15 @@ func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, err return response, nil } -// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call -func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { +// ParsePostRpcPgpKeyIdResponse parses an HTTP response from a PostRpcPgpKeyIdWithResponse call +func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostServicesResponse{ + response := &PostRpcPgpKeyIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14234,95 +2146,20 @@ func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w923LctpK/guJulZ3a8UhxLlWrLT/o2M6JN7aikuzNQ+KaA5GYGUQkSAOgFJ2U/n0L", - "vBMESZAAOWObL4k1bHY30I2+EWj87bhhEIUEEc6cs7+dCFIYII5o8pePA8zFPzzEXIojjkPinDlvxc+Y", - "7AAkHriEO0xg8mTlYPH4U4zog7NyCAyQc5YhWTnM3aMACmz8IRIPGKeY7JzHx5UTbrcMGVPKsPSQoh6i", - "TUq/ip8FTAvq5K1uzBFFW0RfhjFRjOQyeYiIi3IKewRTnBmJFKJGA5E4cM5+d1yB8wUJCXI+rlopXwrZ", - "McukE4VgLxgmOx89C2/+RC7vZCJktkdPEY8peUFRRBFDhOcqkP0eYIID6Jc/JPMk/mKhHwvYF3hHQoqe", - "eXHkYxdyxOqPA0R3tacd47tKaBzDCJVMUkh2aPA6klm9SrB0a3tC6QMZYR+U1J4lqKokPbSFsc+dMwdz", - "FAiRKZgI73/CPkd0TRC/D+kty/+xwZ5AolrLFYgqvW1IAyjIuXtIocsRBXeQPqQ2oYt0SHeQ4H8nY2Rr", - "lyLIkbeBvI1+BUJJn+MAMQ6DCNxjvgfiT/DvVKf12fCQj0o26vK5DrccpACgINZi+Cp4pmO2+leH4GQw", - "JUOYcLRL1Gsk/ZSYPGcXMEAg3AK+R6AK3uovZIwTqFoceT2qVoGwKb0opBz6G+gmjmlDb6C7bhebmaRU", - "tKTf2kk3Aa2IoYOnmCHaz1AONRk3NPRRockqRkqAyXhIBvlniIlQwPRBq54qQJV83YShjyAZxA1b32Df", - "x2S3Sd9Rs1CDmWBODugZZEbqvmFGqy8zsnMjjUUsQU0iG0EDEY65jwLUy40EOQlHwjpSUllTXatZDTwJ", - "X/P7apkDpfWve+sPBH+KEcCekNQWIwq2IU18d/oyKI3MwdxGYyCJESxSbg2+Ki9MN70lkU2iZXfQH8xe", - "+aaSzyi+8bG7jnxIqpB2mKYRG86veMn+lCYD7PJBDbhJ1E4ARWjD4ptiySgX0XUCB6pw8orKnGbLMmoh", - "NMmgjiQWZmnUo2Ozm4BWJyZKqxlizpNo7ODRh8zQ1AmDTE/xe3/iUAeeVECHTyBkjg6+pkqG2DHp7xFE", - "0FVmUBD+idv4SB9OpCZsvYV3IcUcbRiid9hFG+y1ulslrB5nv38cwduxVAlUPFWWWs3paluj6ltzcnsk", - "JlPJW5e3bQOfkz/9AF/9klWn2MOhdrDf87btgF9/ABqBf/uLlqeaIZcivrlFD5s9ZPtmrP0zZHvkgRQO", - "3KKHJLyu4AAw5nsRe7tdZWeZzmTaXSFE0acYU9RqF1SgFmp7VW4OHagIRWapOld1qnupq6HNFa/CDIUc", - "1VdDXeuuIEcgeQ4wAUI6iHEGIkSFJobEa6uPKJBbZTxmcIc2LdsP3sG/cBAHIAEC0PfDe+QlcsMkqfFU", - "TEor91UKU7Heb0NbX7BsNjP+jqEMoWZlQBSkfscmi/chvUWUFQGhBzk87DcEJUdHU7NWchfeE0Q3KIC4", - "Vf2rIDPx05Nd14Em5+lIMhQd3g5bnO7i8LDmTMnZoWuAeYKNiBeF+KDfHpus5P/qUPcqiIHydNDu0pc6", - "UJcnliGHMVOWQdpD5wJiIr04WOScs7KFvn8D3dsjUNGSlfxfm5j67dWsCoxV6ZR8yL9oqEoV1MLSafIy", - "v7aWPBxaW9kauhzftVqO7KlBdlsQukEctoaZ4pkNIm4YiHCVhe1BdxXEEsko5mgTE8zZJkJ0Q5EPH5pZ", - "3suQJVlp9gJIXkiqIgi6e5C+tWrjWUnDfD0c3kod8NtDwcEeUq80NIjAG7+9/KMGtqFK8+/0LUin/r/w", - "o11+QgVql5lPMfQxf9CWSCu8DaHkRtsLA4iJoub0f9DHHsgeZ9tyMAPZe611zTpWS1+NGlzP7txK0l1p", - "Qg1mGvJp5gs9jyLG+vioA1tmiEMeM62lpQKdhJmUbjcX+a8qe4v+4toU73Yb7Lb74+K5MaWZgymGfOQq", - "qrkpW5jswMvQj4Nkcat1L3m/61CKGGdaw/5H6GGUqPE53SX/d0PCUboBuVJ0P/mTpVNdIo1oGCHKs9fr", - "pvCBI6ie3uIbyO9O5WBOdlxKQFSJ3hFvHe0o4+sU4L+Oh4v/IbHvsxfJzq0odSGTMyWU9sRldzMQq4Fw", - "GqPHVaIhz22pSPsCnFFDpmRirIIY8DRYP0bTUqlHfrBskIb8J0Vb58z5j5PydO1J+pSdFAhHCN0e3k45", - "apNRi0bz9ceV5ArKZ6va/nF7c1/HalkAI5CPlkKT1nBRyDga8pAAVo7ilI810ahwWxbQaBKjxdRGcbiw", - "1JgaIlOCyYJjEwmNTSswNquwmBVBsX4h1VaWtAXXuqBk/BMJbBQZY8GpqI4XYBNbqyAboCqBsgmFyaYX", - "JJtdiMyaAJme8KorMdmmYltiKdJpRDUAt6mMSlKjhZOjaJNK9nzlND5ZWpNJE7NlwYwkMFo6anrDRaTC", - "05CTAmjV+AhpX1gl5omENZCAsbDq9MYLq4qnVVgVoEJY1mU0lWhmkoihILrmP0WdvSDwVWsL0tnLOBKW", - "EHngxg/dW3cPMQE5OHh6Gbq3iIMAYkIQXwGOGE/+gbi7/sZZSdWR+pcyqbFJyNHZH+T9HjOAGYDgkuIA", - "0gfwC3pY/xGfnn7nRrcnyT+Qs+quqQfwr7eI7PjeOfv+eV8BpsJUsxSjKADIn4eDCBKMGAgpcGPGwwBR", - "sKNhHDHA95ADFxJwgwDkHLp75AEegsv08Pd5HnjL81T/uFs2IHr54erq9cX7zfs3715fvz9/d1mdCP0q", - "+MoZ05VnFCHFKX07Ym98Ls9/kIkObqOjq1k//rdivPWPGdYlJ6lus7lBc+gqnW6pn0i9CxiigIY+Ykn/", - "rAjRADMmVkHytZRFyMVb7EqdDJrKPJfUNdoxNMj+FFKEd0SQFevyX70tHv6Vcbe9BRze+OjFE+mVJ8BN", - "Ph/JDzbYezLcen33o0LHmgd0x41SIGDScd/W8SXAjcFlb9kaWa1bkC6m56eqdaju+VMsyC30GSrey/cW", - "yOsrWVKqPc+N088l5/3rTeFF3sU+x884IpDwYiWl1iDJQJIVmO3qT46V7GhuruqLTT4dYDSJM7uhUSia", - "rXu0h/zDDy34mocZzHC2ttAxCGLGuFbZDnQ2v2taghp4aQqk957YMdu5ru0Q2VBIvDDYxDH2noqgclyP", - "nT/IH2SiILPLTKsPLoyZmpZDsXnzTi/ZWRiEhO+dlfOAIBW2aOChrZXT28FmCOu1MxHjvJT6nFarn0rA", - "G36qeO+JlQxi5UzSu8bMykwceq4c5WkSe3lYh58t1ajLuyq+WSgiWui6iDHghoTT0Jdi2VoRdvasbO5I", - "udFOYWS03NuqoT1qrrzajJxrOJbouW9k8+aetdhY7rUhTbLeqlXExeeVpyBbf/kJaynvzPjfI0xBeE8A", - "Lc6Up9EzQ5xjsjt4sWUUiqK1jq6CfKtSkLYmOT07l9O21819jgUFSCl8+BpT8I72OWa+vMNC6wfGhwh2", - "FV1wjOKs3u41Yx3evMF0Z2cYrSFM0bnFTEdbWq/0lVjm9lM9Lqpiqzq8VPEVXnJPdxD7wgbVA/y0ZCOm", - "v6/Q396qRU+vbTVX0admrSPKKJIzrNUhKetkn6hWTl9jEn3kp5orRCvJUrUZUKyL9CkQT5N1kL79LHu7", - "qGSKpZAFd8mqTs7zgKQRxxqkBzJAzATkbz+/vnoNZE7BC/Dk8u35xebDxds37968f/3qCTi/eAWqVVAB", - "k2brT6atlk5ROZSal9hApp/4zFcbOzJ2xkcYX2y9a4LaT8PEKLdYtTncHAgINJXz2OX5zZmzPKmdyPRV", - "nEYPkfKWrgDxf/z03lk5bsiCUIQdV6+vxd//e/3rxbOry5fOyvnt+tpZOTvxh8Jb9nQUWTn1k6oDVV1x", - "3rWp4DlQqdwltDW1njUUldrJlDP4sWM11PawSUcWs0fgw9XbrJCZzRm43yMCokzJigUFtmmLq5mXhtzG", - "xDTvUDYjmX7BLSo/XOVb2sFUD7HXtKNjJejuTivWwJaGQZJ1ZLvULtKNXg39L3up9OeueTuUfkipp4nW", - "C1Y7kmjp9OdQ/Gxt89E/p4M2HMpLVnGVX3PJ5kDlki2hbS3Zli4f+rVg1U61rm4d/RNr3l7DWtF5kFme", - "MGOXG2iYiae1H4Yu2h9OlZ+tlU0tDFmVmlP0nH9eOdXeEr3Ah/FXNTeVtzuRdF59cBv9lW72eRW6qjtw", - "Q8Z3IhgHr0I3Dip3rCaicPacR+zs5CQScBQxvg7p7gSRk7tvn69PT2CE13se+Omuom2YLBDM/az/B/Eg", - "9UBqLkC2XXzl3CHKUuoCx/o5eAq/R6en2+03SVUgQgRG2Dlzvlufrk+Fd4R8n7B+Iv6zS+9DLko1bzzn", - "zPlncr0xRSwKCUu96PPTU8Vtxr+kW83jQKw68UOEyPnlG1ABA08Ty+Bl8/GNkBHcMSGNN4TTkEXITdB9", - "FKhO6nvVhXNpsvcq+f0ih1zVrpP+Xb1/vgQ56b7N9XHVi6B2Re/jx8ZMfa+yVOBldvihPmOmO/DzuSzm", - "7ePjqlWoh5uyrK2KBmR6BbYGYHoHsS5gcu+vDvn0cm8NyLSCpK0u6YXdCm05HXQypnCcet0PZH86/MjM", - "DAQ7z9KY01cfsjHF2zh9I4zhynl++qPCLUDKMfTnNAER5O6+aQQuxc9HZTnzRkoPbbKo9VqqSeTYzG6U", - "XUovTXnIxhtefbtZuRff9sR+q0hS08Ry+lkVMYHijFZXYPBrDXy8jndfHq7jeLTvATdAVsnADbBUCgUG", - "WCrB/MxhlKVzerkC1jWuK6RalO3zULYlAJ0zAG20dJolCrVA1TwU7WfCIB7tQ24vKJ3coHYFqItR/Ww9", - "+MCos6HQxxwDtMf3Zgo7X5DfN93akf7Ecy2i/tZT7F2xf0oio3AlXhlvPRQMrIeaDRWO5u4oWyjzzV/G", - "+MrzzsaoVEe1Z04Oxrc6yPVTpYtdWcGihl+IGi5pw5xpQ0tb0VmSB2u0zVMIXVYMEgk9EvbSielMcFce", - "sZjhLzcaGBj5tij8UUYV7XmGuULPl2vozbh2xjHVdDdTDTYwzWDWrAqzaw0MSx4tvJWHIIywNY8cGKFT", - "N+GxMV7FsZFp0JbH1ybCTyNmhrp2oMoIU0uDFSOcUq8oY1zSaS8jfGNrfDKesVW+xuo72Jc6g15oakPO", - "9DPxxVIvlnqx1Iul/nIt9VKvOly9ih2oVsWOo07Fpq1RTfu5e6KoRLs4tUQmS2SyRCZLZPJV5ZBGBUXT", - "3SJTWXy92i37bAq3RttEJpnkasVW2RRWo3Jbvmfps5DEyOhPQzIedX8zm6iNPhPJOE1ti4zvcHWqwd2E", - "ZYWVVVOjSrVo5ZeolUtOfoicXHFZ5qy5uRX69nJ0HXYs5Or9ZCzvKbFtoTUy9sVKfyWxw8i4WbEGji0O", - "6c1SDHV8/mSlf9KH7TSxO+PqlIWNSFeYVXvDprER1mqQPZyOr89VEafd96fgz7Tcp43esOynT2d0+a+H", - "RHVdGuNXXoRgjFVu0W4TYdGjyBipaZGwisueQz7khpNpLhlpt/lsWKa/GPTFoC8GfTHoX7ZBX2pgh62B", - "sQPWv9jx1L7Y9HWvafepHCaYGVQUWwKaJaBZApoloPnqMlTjyqXplpYDOQf9WjL7rArJRjtfDiGLSpW5", - "cqNdf3n5MgE29trqq41GLUw1KmMbnKGVL7qzh8rMy1VwSrf+GWJrXkE4dw1u+E2KkqqnCt1fWVt0edHl", - "pfxwFOWHdMnOXHcwIGqt4NDOg3mloQ23xRKDRVvdXzhY7PViryfMrorlciTBS1+yNG45zJ4ltU2rfnpk", - "bU4rSU/b7cXdEeNv6VsZpVfiHWNzpOLEUsVRidrOQbgurs1sqhKz8UkwnVk2LHAqSVg62KXEXb0S2jLS", - "AZs1l3j5APGy0nzNHD7b48FaNK3NknlwrUnKYqx9tDfpS95WOTOp86WRewJpENIuV3sVuecJTMO1YjFL", - "6eWC1bv6OI3RqiLG4u6/mweOoOKiv48DLqzLB/eURu43IGW+Ozpr518v4BI/sHEh1zndqUKtoaPLReUh", - "HWG9yqCMxaW+99FAWjn/vfJqHcIsEntuILJyiLnQdkikZcQLg00cpzehdgjvn4hcJcAf4uSiy5FsyER7", - "Z1yma3fetX2ufGvnYIc5AkGnt2viU7sqxXWj9RX2aFGWVdVi0Of9OnUtoI7PIBQD0NFP9RiO3iJUxpjL", - "LdpFm8RMbPYIeslIOgV4uYsSD/ZzBn18gmyOqFeivYM6esmqBl0V8S162PQa/Mtd9At6eOMdY3RVGYSO", - "OFvGcexRVm2UQn75xp78Lm6Nj/HX6SuvizfGl6Ea1NfFneBDixVNVJVLtA0xFUwNLwE1kY3dC9TEdMCz", - "KkVZNOcGiKlJS6IIuvvKDfu5AjY1resr+aJkn6WSLQW5OQtyzSU1VxnOEmXz4pseIwYlNx0CU3zUNjWs", - "XZ+0F+P6pXjwgdGjUpmPIg5oj7eNlXW+r8460zvi07PZ3Faj/C30/Rvo3upH+T8Vb5jbiIJ645fRK7yJ", - "0hxTwVRMfVNcpqaixHS4YD9XAfDh6m3WYCTljoH7PSIgolhAFmrKwBZiX6GVpfZpRP6L4n2WirckAIdI", - "AMqVNXcCYEjZXgLQzYiFBKCLgL0EYCJjq5ENLAb3S/H0I6PWmoIfX7zQmyGMV+D5M4SuudbOECaZ6Eq6", - "oJ8lWLAZxuu6RDB8Y2mBQgDGHG1igjnbRIhuKPKFiTdiyAsDiAkzxJLujoSeRxEbi4sgfh/S2/FzDF2O", - "78bO7g1K9qmNFAwmuw0Lhx5rKDB8iqGP+UPpiRAR2fXYidhD6tnCxe52G+yOHlkU3/jYLZL+0d6MrRmH", - "PGYWMaWfdMehGHsAv9QZM5d8yJz7Oo6ikHLkgRs/dG/dPcSktO5bGgaA7xG4DN1bxMFFuqqbll0r016M", - "92K8F+O9GO+v2ngvdasD1K1mL1cduko1VXFq2pqU1WBEoxK1BCRLQLIEJEtAsmSTNuq6puVcu9a/r4j7", - "GRRvjWq2FmczQYzoXT5PYnmdOXvOo7OTEz90ob8PGT/77vT01Hn8+Pj/AQAA//9KmDaF3CABAA==", + "H4sIAAAAAAAC/8xXTY/iRhD9K1YlhxnFoR02J0d7mGiizWgPQbPJaYRQT7sw3tjdvdVttAj5v0fVhsUM", + "EDNAJhz4cFPueq9eUa+9BGUqazRq7yBdgpUkK/RI7RXhFGnEa+E6Q6eosL4wGlIYhV9RK4QYCl6ZocyQ", + "IAYtK/wWATE4NcNK8hao6wrSpzaRe+8KnZf4o3n+jMrDOAa/sHyn81ToHJqmiYHwS43O/2qyAgOMO8rD", + "pzLao/b8VVpbFkoyMvHZMbxlJ6klY5H86nZ+TQ1V0kMKzwuPEnbztmkLwozRdpCtoHJEN+lcZwObk/OD", + "NuCH60Hxi67L0r3nTa3lnd4AlMevXig3f4NkWyGeamzi0CHDS7UIc/nfO+S/BHFqg5yB6dX9cXKu3fbg", + "JfzqkbQs743aN9mM8/njb5/+jO6NqivUPlQPYqip5DnnvXWpEJbjCLmalAvUYv7TcJAIaYvBzFclNDwX", + "p4YT+MKXLXKpM0lZZOvnslDRinwMcyTXZuc9BsPoRv6MSTKd3vI2xqKWtoAU3g2SQQIxWOlnAbrgtxxD", + "j3P5AtSHDFL4gFwyQmeNdm1Nh0myS/ePj6GSrq4qSQtesKjvRg9RJyy68bPCRdmqHresheQx/AQP2pNx", + "FlXYbsxbCbJKSKoM/Ru4R6vuQky85TtPy9ZNvtRIC3gpX9dMeqfH+BX013RuyKrbqAU/bmJgkXfhc4sc", + "xv894RRS+E5s3FVsQsSWr7Yg1xa34FT7bt9yQREssDmb3VqqDI8R634VdbZcB/7Mp6u1xt+r10EKb6LY", + "8AzJNhTXouWoJyR1ZqpJXRdZj3gfUD+G4L849mQYL5P2Vvxl3svW/Wh/P9ubL+2rx3riMcedi2nZbS0n", + "S9/fU5846voGwjcCx/Tnfg5XPxE6HNe62dxOwpiYtI9irkfAUW6Dg/2+ir4+IXcZ9SraS+rqld1Huivx", + "37iY9A78UW4/4uIhu8bTVYfEMXIe4HHtp6wtluGEjTRfg988SaRClEbJcmacT98lSQLNuPknAAD///mR", + "0fSZEQAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go index baff77f32..823465bb1 100644 --- a/portal-db/sdk/go/models.go +++ b/portal-db/sdk/go/models.go @@ -3,1555 +3,54 @@ // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. package portaldb -// Defines values for PortalAccountsPortalAccountUserLimitInterval. -const ( - PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" - PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" - PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" -) - -// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. -const ( - PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" - PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" - PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" -) - -// Defines values for PortalPlansPlanUsageLimitInterval. -const ( - Day PortalPlansPlanUsageLimitInterval = "day" - Month PortalPlansPlanUsageLimitInterval = "month" - Year PortalPlansPlanUsageLimitInterval = "year" -) - -// Defines values for ServiceEndpointsEndpointType. -const ( - CometBFT ServiceEndpointsEndpointType = "cometBFT" - Cosmos ServiceEndpointsEndpointType = "cosmos" - GRPC ServiceEndpointsEndpointType = "gRPC" - JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" - REST ServiceEndpointsEndpointType = "REST" - WSS ServiceEndpointsEndpointType = "WSS" -) - -// Defines values for PreferCount. -const ( - PreferCountCountNone PreferCount = "count=none" -) - -// Defines values for PreferParams. -const ( - PreferParamsParamsSingleObject PreferParams = "params=single-object" -) - -// Defines values for PreferPost. -const ( - PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" - PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" - PreferPostReturnMinimal PreferPost = "return=minimal" - PreferPostReturnNone PreferPost = "return=none" - PreferPostReturnRepresentation PreferPost = "return=representation" -) - -// Defines values for PreferReturn. -const ( - PreferReturnReturnMinimal PreferReturn = "return=minimal" - PreferReturnReturnNone PreferReturn = "return=none" - PreferReturnReturnRepresentation PreferReturn = "return=representation" -) - -// Defines values for DeleteNetworksParamsPrefer. -const ( - DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" - DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" - DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" -) - -// Defines values for GetNetworksParamsPrefer. -const ( - GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" -) - -// Defines values for PatchNetworksParamsPrefer. -const ( - PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" - PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" - PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" -) - -// Defines values for PostNetworksParamsPrefer. -const ( - PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" - PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" - PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" - PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" - PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" -) - -// Defines values for DeleteOrganizationsParamsPrefer. -const ( - DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" - DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" - DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for GetOrganizationsParamsPrefer. -const ( - GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" -) - -// Defines values for PatchOrganizationsParamsPrefer. -const ( - PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" - PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" - PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for PostOrganizationsParamsPrefer. -const ( - PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" - PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" - PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" - PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" - PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalAccountRbacParamsPrefer. -const ( - DeletePortalAccountRbacParamsPreferReturnMinimal DeletePortalAccountRbacParamsPrefer = "return=minimal" - DeletePortalAccountRbacParamsPreferReturnNone DeletePortalAccountRbacParamsPrefer = "return=none" - DeletePortalAccountRbacParamsPreferReturnRepresentation DeletePortalAccountRbacParamsPrefer = "return=representation" -) - -// Defines values for GetPortalAccountRbacParamsPrefer. -const ( - GetPortalAccountRbacParamsPreferCountNone GetPortalAccountRbacParamsPrefer = "count=none" -) - -// Defines values for PatchPortalAccountRbacParamsPrefer. -const ( - PatchPortalAccountRbacParamsPreferReturnMinimal PatchPortalAccountRbacParamsPrefer = "return=minimal" - PatchPortalAccountRbacParamsPreferReturnNone PatchPortalAccountRbacParamsPrefer = "return=none" - PatchPortalAccountRbacParamsPreferReturnRepresentation PatchPortalAccountRbacParamsPrefer = "return=representation" -) - -// Defines values for PostPortalAccountRbacParamsPrefer. -const ( - PostPortalAccountRbacParamsPreferResolutionIgnoreDuplicates PostPortalAccountRbacParamsPrefer = "resolution=ignore-duplicates" - PostPortalAccountRbacParamsPreferResolutionMergeDuplicates PostPortalAccountRbacParamsPrefer = "resolution=merge-duplicates" - PostPortalAccountRbacParamsPreferReturnMinimal PostPortalAccountRbacParamsPrefer = "return=minimal" - PostPortalAccountRbacParamsPreferReturnNone PostPortalAccountRbacParamsPrefer = "return=none" - PostPortalAccountRbacParamsPreferReturnRepresentation PostPortalAccountRbacParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalAccountsParamsPrefer. -const ( - DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" - DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" - DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalAccountsParamsPrefer. -const ( - GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalAccountsParamsPrefer. -const ( - PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" - PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" - PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalAccountsParamsPrefer. -const ( - PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" - PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" - PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" - PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" - PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalApplicationRbacParamsPrefer. -const ( - DeletePortalApplicationRbacParamsPreferReturnMinimal DeletePortalApplicationRbacParamsPrefer = "return=minimal" - DeletePortalApplicationRbacParamsPreferReturnNone DeletePortalApplicationRbacParamsPrefer = "return=none" - DeletePortalApplicationRbacParamsPreferReturnRepresentation DeletePortalApplicationRbacParamsPrefer = "return=representation" -) - -// Defines values for GetPortalApplicationRbacParamsPrefer. -const ( - GetPortalApplicationRbacParamsPreferCountNone GetPortalApplicationRbacParamsPrefer = "count=none" -) - -// Defines values for PatchPortalApplicationRbacParamsPrefer. -const ( - PatchPortalApplicationRbacParamsPreferReturnMinimal PatchPortalApplicationRbacParamsPrefer = "return=minimal" - PatchPortalApplicationRbacParamsPreferReturnNone PatchPortalApplicationRbacParamsPrefer = "return=none" - PatchPortalApplicationRbacParamsPreferReturnRepresentation PatchPortalApplicationRbacParamsPrefer = "return=representation" -) - -// Defines values for PostPortalApplicationRbacParamsPrefer. -const ( - PostPortalApplicationRbacParamsPreferResolutionIgnoreDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=ignore-duplicates" - PostPortalApplicationRbacParamsPreferResolutionMergeDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=merge-duplicates" - PostPortalApplicationRbacParamsPreferReturnMinimal PostPortalApplicationRbacParamsPrefer = "return=minimal" - PostPortalApplicationRbacParamsPreferReturnNone PostPortalApplicationRbacParamsPrefer = "return=none" - PostPortalApplicationRbacParamsPreferReturnRepresentation PostPortalApplicationRbacParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalApplicationsParamsPrefer. -const ( - DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" - DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" - DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for GetPortalApplicationsParamsPrefer. -const ( - GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" -) - -// Defines values for PatchPortalApplicationsParamsPrefer. -const ( - PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" - PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" - PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for PostPortalApplicationsParamsPrefer. -const ( - PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" - PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" - PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" - PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" - PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" -) - -// Defines values for DeletePortalPlansParamsPrefer. -const ( - DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" - DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" - DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" -) - -// Defines values for GetPortalPlansParamsPrefer. -const ( - GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" -) - -// Defines values for PatchPortalPlansParamsPrefer. -const ( - PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" - PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" - PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for PostPortalPlansParamsPrefer. -const ( - PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" - PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" - PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" - PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" - PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" -) - -// Defines values for GetPortalWorkersAccountDataParamsPrefer. -const ( - GetPortalWorkersAccountDataParamsPreferCountNone GetPortalWorkersAccountDataParamsPrefer = "count=none" -) - -// Defines values for PostRpcArmorParamsPrefer. -const ( - PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcDearmorParamsPrefer. -const ( - PostRpcDearmorParamsPreferParamsSingleObject PostRpcDearmorParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcGenRandomUuidParamsPrefer. -const ( - PostRpcGenRandomUuidParamsPreferParamsSingleObject PostRpcGenRandomUuidParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcGenSaltParamsPrefer. -const ( - PostRpcGenSaltParamsPreferParamsSingleObject PostRpcGenSaltParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcPgpArmorHeadersParamsPrefer. -const ( - PostRpcPgpArmorHeadersParamsPreferParamsSingleObject PostRpcPgpArmorHeadersParamsPrefer = "params=single-object" -) - -// Defines values for PostRpcPgpKeyIdParamsPrefer. -const ( - ParamsSingleObject PostRpcPgpKeyIdParamsPrefer = "params=single-object" -) - -// Defines values for DeleteServiceEndpointsParamsPrefer. -const ( - DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" - DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" - DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for GetServiceEndpointsParamsPrefer. -const ( - GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" -) - -// Defines values for PatchServiceEndpointsParamsPrefer. -const ( - PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" - PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" - PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for PostServiceEndpointsParamsPrefer. -const ( - PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" - PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" - PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" - PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" - PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" -) - -// Defines values for DeleteServiceFallbacksParamsPrefer. -const ( - DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" - DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" - DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for GetServiceFallbacksParamsPrefer. -const ( - GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" -) - -// Defines values for PatchServiceFallbacksParamsPrefer. -const ( - PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" - PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" - PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for PostServiceFallbacksParamsPrefer. -const ( - PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" - PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" - PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" - PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" - PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" -) - -// Defines values for DeleteServicesParamsPrefer. -const ( - DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" - DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" - DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" -) - -// Defines values for GetServicesParamsPrefer. -const ( - GetServicesParamsPreferCountNone GetServicesParamsPrefer = "count=none" -) - -// Defines values for PatchServicesParamsPrefer. -const ( - PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" - PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" - PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" -) - -// Defines values for PostServicesParamsPrefer. -const ( - PostServicesParamsPreferResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" - PostServicesParamsPreferResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" - PostServicesParamsPreferReturnMinimal PostServicesParamsPrefer = "return=minimal" - PostServicesParamsPreferReturnNone PostServicesParamsPrefer = "return=none" - PostServicesParamsPreferReturnRepresentation PostServicesParamsPrefer = "return=representation" -) - -// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) -type Networks struct { - // NetworkId Note: - // This is a Primary Key. - NetworkId string `json:"network_id"` -} - -// Organizations Companies or customer groups that can be attached to Portal Accounts -type Organizations struct { - CreatedAt *string `json:"created_at,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *string `json:"deleted_at,omitempty"` - - // OrganizationId Note: - // This is a Primary Key. - OrganizationId int `json:"organization_id"` - - // OrganizationName Name of the organization - OrganizationName string `json:"organization_name"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalAccountRbac User roles and permissions for specific portal accounts -type PortalAccountRbac struct { - // Id Note: - // This is a Primary Key. - Id int `json:"id"` - - // PortalAccountId Note: - // This is a Foreign Key to `portal_accounts.portal_account_id`. - PortalAccountId string `json:"portal_account_id"` - - // PortalUserId Note: - // This is a Foreign Key to `portal_users.portal_user_id`. - PortalUserId string `json:"portal_user_id"` - RoleName string `json:"role_name"` - UserJoinedAccount *bool `json:"user_joined_account,omitempty"` -} - -// PortalAccounts Multi-tenant accounts with plans and billing integration -type PortalAccounts struct { - BillingType *string `json:"billing_type,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - GcpAccountId *string `json:"gcp_account_id,omitempty"` - GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` - InternalAccountName *string `json:"internal_account_name,omitempty"` - - // OrganizationId Note: - // This is a Foreign Key to `organizations.organization_id`. - OrganizationId *int `json:"organization_id,omitempty"` - - // PortalAccountId Unique identifier for the portal account - // - // Note: - // This is a Primary Key. - PortalAccountId string `json:"portal_account_id"` - PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` - - // PortalPlanType Note: - // This is a Foreign Key to `portal_plans.portal_plan_type`. - PortalPlanType string `json:"portal_plan_type"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - UserAccountName *string `json:"user_account_name,omitempty"` -} - -// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. -type PortalAccountsPortalAccountUserLimitInterval string - -// PortalApplicationRbac User access controls for specific applications -type PortalApplicationRbac struct { - CreatedAt *string `json:"created_at,omitempty"` - - // Id Note: - // This is a Primary Key. - Id int `json:"id"` - - // PortalApplicationId Note: - // This is a Foreign Key to `portal_applications.portal_application_id`. - PortalApplicationId string `json:"portal_application_id"` - - // PortalUserId Note: - // This is a Foreign Key to `portal_users.portal_user_id`. - PortalUserId string `json:"portal_user_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalApplications Applications created within portal accounts with their own rate limits and settings -type PortalApplications struct { - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - Emoji *string `json:"emoji,omitempty"` - FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` - - // PortalAccountId Note: - // This is a Foreign Key to `portal_accounts.portal_account_id`. - PortalAccountId string `json:"portal_account_id"` - PortalApplicationDescription *string `json:"portal_application_description,omitempty"` - - // PortalApplicationId Note: - // This is a Primary Key. - PortalApplicationId string `json:"portal_application_id"` - PortalApplicationName *string `json:"portal_application_name,omitempty"` - PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *string `json:"secret_key_hash,omitempty"` - SecretKeyRequired *bool `json:"secret_key_required,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. -type PortalApplicationsPortalApplicationUserLimitInterval string - -// PortalPlans Available subscription plans for Portal Accounts -type PortalPlans struct { - PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` - - // PortalPlanType Note: - // This is a Primary Key. - PortalPlanType string `json:"portal_plan_type"` - PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` -} - -// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. -type PortalPlansPlanUsageLimitInterval string - -// PortalWorkersAccountData Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' -type PortalWorkersAccountData struct { - BillingType *string `json:"billing_type,omitempty"` - GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` - OwnerEmail *string `json:"owner_email,omitempty"` - - // OwnerUserId Note: - // This is a Primary Key. - OwnerUserId *string `json:"owner_user_id,omitempty"` - - // PortalAccountId Note: - // This is a Primary Key. - PortalAccountId *string `json:"portal_account_id,omitempty"` - PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` - - // PortalPlanType Note: - // This is a Foreign Key to `portal_plans.portal_plan_type`. - PortalPlanType *string `json:"portal_plan_type,omitempty"` - UserAccountName *string `json:"user_account_name,omitempty"` -} - -// ServiceEndpoints Available endpoint types for each service -type ServiceEndpoints struct { - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId Note: - // This is a Primary Key. - EndpointId int `json:"endpoint_id"` - EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. -type ServiceEndpointsEndpointType string - -// ServiceFallbacks Fallback URLs for services when primary endpoints fail -type ServiceFallbacks struct { - CreatedAt *string `json:"created_at,omitempty"` - FallbackUrl string `json:"fallback_url"` - - // ServiceFallbackId Note: - // This is a Primary Key. - ServiceFallbackId int `json:"service_fallback_id"` - - // ServiceId Note: - // This is a Foreign Key to `services.service_id`. - ServiceId string `json:"service_id"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Services Supported blockchain services from the Pocket Network -type Services struct { - Active *bool `json:"active,omitempty"` - Beta *bool `json:"beta,omitempty"` - ComingSoon *bool `json:"coming_soon,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - DeletedAt *string `json:"deleted_at,omitempty"` - HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` - - // NetworkId Note: - // This is a Foreign Key to `networks.network_id`. - NetworkId *string `json:"network_id,omitempty"` - PublicEndpointUrl *string `json:"public_endpoint_url,omitempty"` - QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains []string `json:"service_domains"` - - // ServiceId Note: - // This is a Primary Key. - ServiceId string `json:"service_id"` - ServiceName string `json:"service_name"` - ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` - StatusEndpointUrl *string `json:"status_endpoint_url,omitempty"` - StatusQuery *string `json:"status_query,omitempty"` - SvgIcon *string `json:"svg_icon,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// Limit defines model for limit. -type Limit = string - -// Offset defines model for offset. -type Offset = string - -// Order defines model for order. -type Order = string - -// PreferCount defines model for preferCount. -type PreferCount string - -// PreferParams defines model for preferParams. -type PreferParams string - -// PreferPost defines model for preferPost. -type PreferPost string - -// PreferReturn defines model for preferReturn. -type PreferReturn string - -// Range defines model for range. -type Range = string - -// RangeUnit defines model for rangeUnit. -type RangeUnit = string - -// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. -type RowFilterNetworksNetworkId = string - -// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. -type RowFilterOrganizationsCreatedAt = string - -// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. -type RowFilterOrganizationsDeletedAt = string - -// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. -type RowFilterOrganizationsOrganizationId = string - -// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. -type RowFilterOrganizationsOrganizationName = string - -// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. -type RowFilterOrganizationsUpdatedAt = string - -// RowFilterPortalAccountRbacId defines model for rowFilter.portal_account_rbac.id. -type RowFilterPortalAccountRbacId = string - -// RowFilterPortalAccountRbacPortalAccountId defines model for rowFilter.portal_account_rbac.portal_account_id. -type RowFilterPortalAccountRbacPortalAccountId = string - -// RowFilterPortalAccountRbacPortalUserId defines model for rowFilter.portal_account_rbac.portal_user_id. -type RowFilterPortalAccountRbacPortalUserId = string - -// RowFilterPortalAccountRbacRoleName defines model for rowFilter.portal_account_rbac.role_name. -type RowFilterPortalAccountRbacRoleName = string - -// RowFilterPortalAccountRbacUserJoinedAccount defines model for rowFilter.portal_account_rbac.user_joined_account. -type RowFilterPortalAccountRbacUserJoinedAccount = string - -// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. -type RowFilterPortalAccountsBillingType = string - -// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. -type RowFilterPortalAccountsCreatedAt = string - -// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. -type RowFilterPortalAccountsDeletedAt = string - -// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. -type RowFilterPortalAccountsGcpAccountId = string - -// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. -type RowFilterPortalAccountsGcpEntitlementId = string - -// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. -type RowFilterPortalAccountsInternalAccountName = string - -// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. -type RowFilterPortalAccountsOrganizationId = string - -// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. -type RowFilterPortalAccountsPortalAccountId = string - -// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. -type RowFilterPortalAccountsPortalAccountUserLimit = string - -// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. -type RowFilterPortalAccountsPortalAccountUserLimitInterval = string - -// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. -type RowFilterPortalAccountsPortalAccountUserLimitRps = string - -// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. -type RowFilterPortalAccountsPortalPlanType = string - -// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. -type RowFilterPortalAccountsStripeSubscriptionId = string - -// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. -type RowFilterPortalAccountsUpdatedAt = string - -// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. -type RowFilterPortalAccountsUserAccountName = string - -// RowFilterPortalApplicationRbacCreatedAt defines model for rowFilter.portal_application_rbac.created_at. -type RowFilterPortalApplicationRbacCreatedAt = string - -// RowFilterPortalApplicationRbacId defines model for rowFilter.portal_application_rbac.id. -type RowFilterPortalApplicationRbacId = string - -// RowFilterPortalApplicationRbacPortalApplicationId defines model for rowFilter.portal_application_rbac.portal_application_id. -type RowFilterPortalApplicationRbacPortalApplicationId = string - -// RowFilterPortalApplicationRbacPortalUserId defines model for rowFilter.portal_application_rbac.portal_user_id. -type RowFilterPortalApplicationRbacPortalUserId = string - -// RowFilterPortalApplicationRbacUpdatedAt defines model for rowFilter.portal_application_rbac.updated_at. -type RowFilterPortalApplicationRbacUpdatedAt = string - -// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. -type RowFilterPortalApplicationsCreatedAt = string - -// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. -type RowFilterPortalApplicationsDeletedAt = string - -// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. -type RowFilterPortalApplicationsEmoji = string - -// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. -type RowFilterPortalApplicationsFavoriteServiceIds = string - -// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. -type RowFilterPortalApplicationsPortalAccountId = string - -// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. -type RowFilterPortalApplicationsPortalApplicationDescription = string - -// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. -type RowFilterPortalApplicationsPortalApplicationId = string - -// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. -type RowFilterPortalApplicationsPortalApplicationName = string - -// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. -type RowFilterPortalApplicationsPortalApplicationUserLimit = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. -type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string - -// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. -type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string - -// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. -type RowFilterPortalApplicationsSecretKeyHash = string - -// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. -type RowFilterPortalApplicationsSecretKeyRequired = string - -// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. -type RowFilterPortalApplicationsUpdatedAt = string - -// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. -type RowFilterPortalPlansPlanApplicationLimit = string - -// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. -type RowFilterPortalPlansPlanRateLimitRps = string - -// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. -type RowFilterPortalPlansPlanUsageLimit = string - -// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. -type RowFilterPortalPlansPlanUsageLimitInterval = string - -// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. -type RowFilterPortalPlansPortalPlanType = string - -// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. -type RowFilterPortalPlansPortalPlanTypeDescription = string - -// RowFilterPortalWorkersAccountDataBillingType defines model for rowFilter.portal_workers_account_data.billing_type. -type RowFilterPortalWorkersAccountDataBillingType = string - -// RowFilterPortalWorkersAccountDataGcpEntitlementId defines model for rowFilter.portal_workers_account_data.gcp_entitlement_id. -type RowFilterPortalWorkersAccountDataGcpEntitlementId = string - -// RowFilterPortalWorkersAccountDataOwnerEmail defines model for rowFilter.portal_workers_account_data.owner_email. -type RowFilterPortalWorkersAccountDataOwnerEmail = string - -// RowFilterPortalWorkersAccountDataOwnerUserId defines model for rowFilter.portal_workers_account_data.owner_user_id. -type RowFilterPortalWorkersAccountDataOwnerUserId = string - -// RowFilterPortalWorkersAccountDataPortalAccountId defines model for rowFilter.portal_workers_account_data.portal_account_id. -type RowFilterPortalWorkersAccountDataPortalAccountId = string - -// RowFilterPortalWorkersAccountDataPortalAccountUserLimit defines model for rowFilter.portal_workers_account_data.portal_account_user_limit. -type RowFilterPortalWorkersAccountDataPortalAccountUserLimit = string - -// RowFilterPortalWorkersAccountDataPortalPlanType defines model for rowFilter.portal_workers_account_data.portal_plan_type. -type RowFilterPortalWorkersAccountDataPortalPlanType = string - -// RowFilterPortalWorkersAccountDataUserAccountName defines model for rowFilter.portal_workers_account_data.user_account_name. -type RowFilterPortalWorkersAccountDataUserAccountName = string - -// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. -type RowFilterServiceEndpointsCreatedAt = string - -// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. -type RowFilterServiceEndpointsEndpointId = string - -// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. -type RowFilterServiceEndpointsEndpointType = string - -// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. -type RowFilterServiceEndpointsServiceId = string - -// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. -type RowFilterServiceEndpointsUpdatedAt = string - -// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. -type RowFilterServiceFallbacksCreatedAt = string - -// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. -type RowFilterServiceFallbacksFallbackUrl = string - -// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. -type RowFilterServiceFallbacksServiceFallbackId = string - -// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. -type RowFilterServiceFallbacksServiceId = string - -// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. -type RowFilterServiceFallbacksUpdatedAt = string - -// RowFilterServicesActive defines model for rowFilter.services.active. -type RowFilterServicesActive = string - -// RowFilterServicesBeta defines model for rowFilter.services.beta. -type RowFilterServicesBeta = string - -// RowFilterServicesComingSoon defines model for rowFilter.services.coming_soon. -type RowFilterServicesComingSoon = string - -// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. -type RowFilterServicesComputeUnitsPerRelay = string - -// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. -type RowFilterServicesCreatedAt = string - -// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. -type RowFilterServicesDeletedAt = string - -// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. -type RowFilterServicesHardFallbackEnabled = string - -// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. -type RowFilterServicesNetworkId = string - -// RowFilterServicesPublicEndpointUrl defines model for rowFilter.services.public_endpoint_url. -type RowFilterServicesPublicEndpointUrl = string - -// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. -type RowFilterServicesQualityFallbackEnabled = string - -// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. -type RowFilterServicesServiceDomains = string - -// RowFilterServicesServiceId defines model for rowFilter.services.service_id. -type RowFilterServicesServiceId = string - -// RowFilterServicesServiceName defines model for rowFilter.services.service_name. -type RowFilterServicesServiceName = string - -// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. -type RowFilterServicesServiceOwnerAddress = string - -// RowFilterServicesStatusEndpointUrl defines model for rowFilter.services.status_endpoint_url. -type RowFilterServicesStatusEndpointUrl = string - -// RowFilterServicesStatusQuery defines model for rowFilter.services.status_query. -type RowFilterServicesStatusQuery = string - -// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. -type RowFilterServicesSvgIcon = string - -// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. -type RowFilterServicesUpdatedAt = string - -// Select defines model for select. -type Select = string - -// Args defines model for Args. -type Args struct { - Empty string `json:""` -} - -// Args2 defines model for Args2. -type Args2 struct { - Empty string `json:""` -} - -// DeleteNetworksParams defines parameters for DeleteNetworks. -type DeleteNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. -type DeleteNetworksParamsPrefer string - -// GetNetworksParams defines parameters for GetNetworks. -type GetNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetNetworksParamsPrefer defines parameters for GetNetworks. -type GetNetworksParamsPrefer string - -// PatchNetworksParams defines parameters for PatchNetworks. -type PatchNetworksParams struct { - NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - - // Prefer Preference - Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchNetworksParamsPrefer defines parameters for PatchNetworks. -type PatchNetworksParamsPrefer string - -// PostNetworksParams defines parameters for PostNetworks. -type PostNetworksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostNetworksParamsPrefer defines parameters for PostNetworks. -type PostNetworksParamsPrefer string - -// DeleteOrganizationsParams defines parameters for DeleteOrganizations. -type DeleteOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. -type DeleteOrganizationsParamsPrefer string - -// GetOrganizationsParams defines parameters for GetOrganizations. -type GetOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. -type GetOrganizationsParamsPrefer string - -// PatchOrganizationsParams defines parameters for PatchOrganizations. -type PatchOrganizationsParams struct { - OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - - // OrganizationName Name of the organization - OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` - - // DeletedAt Soft delete timestamp - DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. -type PatchOrganizationsParamsPrefer string - -// PostOrganizationsParams defines parameters for PostOrganizations. -type PostOrganizationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. -type PostOrganizationsParamsPrefer string - -// DeletePortalAccountRbacParams defines parameters for DeletePortalAccountRbac. -type DeletePortalAccountRbacParams struct { - Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` - UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` - - // Prefer Preference - Prefer *DeletePortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalAccountRbacParamsPrefer defines parameters for DeletePortalAccountRbac. -type DeletePortalAccountRbacParamsPrefer string - -// GetPortalAccountRbacParams defines parameters for GetPortalAccountRbac. -type GetPortalAccountRbacParams struct { - Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` - UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalAccountRbacParamsPrefer defines parameters for GetPortalAccountRbac. -type GetPortalAccountRbacParamsPrefer string - -// PatchPortalAccountRbacParams defines parameters for PatchPortalAccountRbac. -type PatchPortalAccountRbacParams struct { - Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` - UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` - - // Prefer Preference - Prefer *PatchPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalAccountRbacParamsPrefer defines parameters for PatchPortalAccountRbac. -type PatchPortalAccountRbacParamsPrefer string - -// PostPortalAccountRbacParams defines parameters for PostPortalAccountRbac. -type PostPortalAccountRbacParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalAccountRbacParamsPrefer defines parameters for PostPortalAccountRbac. -type PostPortalAccountRbacParamsPrefer string - -// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. -type DeletePortalAccountsParamsPrefer string - -// GetPortalAccountsParams defines parameters for GetPortalAccounts. -type GetPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. -type GetPortalAccountsParamsPrefer string - -// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParams struct { - // PortalAccountId Unique identifier for the portal account - PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` - PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` - PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` - PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` - BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - - // StripeSubscriptionId Stripe subscription identifier for billing - StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` - GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` - GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. -type PatchPortalAccountsParamsPrefer string - -// PostPortalAccountsParams defines parameters for PostPortalAccounts. -type PostPortalAccountsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. -type PostPortalAccountsParamsPrefer string - -// DeletePortalApplicationRbacParams defines parameters for DeletePortalApplicationRbac. -type DeletePortalApplicationRbacParams struct { - Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalApplicationRbacParamsPrefer defines parameters for DeletePortalApplicationRbac. -type DeletePortalApplicationRbacParamsPrefer string - -// GetPortalApplicationRbacParams defines parameters for GetPortalApplicationRbac. -type GetPortalApplicationRbacParams struct { - Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalApplicationRbacParamsPrefer defines parameters for GetPortalApplicationRbac. -type GetPortalApplicationRbacParamsPrefer string - -// PatchPortalApplicationRbacParams defines parameters for PatchPortalApplicationRbac. -type PatchPortalApplicationRbacParams struct { - Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` - PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` - CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalApplicationRbacParamsPrefer defines parameters for PatchPortalApplicationRbac. -type PatchPortalApplicationRbacParamsPrefer string - -// PostPortalApplicationRbacParams defines parameters for PostPortalApplicationRbac. -type PostPortalApplicationRbacParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalApplicationRbacParamsPrefer defines parameters for PostPortalApplicationRbac. -type PostPortalApplicationRbacParamsPrefer string - -// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. -type DeletePortalApplicationsParamsPrefer string - -// GetPortalApplicationsParams defines parameters for GetPortalApplications. -type GetPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. -type GetPortalApplicationsParamsPrefer string - -// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParams struct { - PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` - PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` - Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` - PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` - PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` - PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` - PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` - FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` - - // SecretKeyHash Hashed secret key for application authentication - SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` - SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` - DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. -type PatchPortalApplicationsParamsPrefer string - -// PostPortalApplicationsParams defines parameters for PostPortalApplications. -type PostPortalApplicationsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. -type PostPortalApplicationsParamsPrefer string - -// DeletePortalPlansParams defines parameters for DeletePortalPlans. -type DeletePortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Prefer Preference - Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` -} - -// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. -type DeletePortalPlansParamsPrefer string - -// GetPortalPlansParams defines parameters for GetPortalPlans. -type GetPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` - - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` - - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} +// Defines values for PreferParams. +const ( + PreferParamsParamsSingleObject PreferParams = "params=single-object" +) -// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. -type GetPortalPlansParamsPrefer string +// Defines values for PostRpcArmorParamsPrefer. +const ( + PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" +) -// PatchPortalPlansParams defines parameters for PatchPortalPlans. -type PatchPortalPlansParams struct { - PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` +// Defines values for PostRpcDearmorParamsPrefer. +const ( + PostRpcDearmorParamsPreferParamsSingleObject PostRpcDearmorParamsPrefer = "params=single-object" +) - // PlanUsageLimit Maximum usage allowed within the interval - PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` - PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` +// Defines values for PostRpcGenRandomUuidParamsPrefer. +const ( + PostRpcGenRandomUuidParamsPreferParamsSingleObject PostRpcGenRandomUuidParamsPrefer = "params=single-object" +) - // PlanRateLimitRps Rate limit in requests per second - PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` - PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` +// Defines values for PostRpcGenSaltParamsPrefer. +const ( + PostRpcGenSaltParamsPreferParamsSingleObject PostRpcGenSaltParamsPrefer = "params=single-object" +) - // Prefer Preference - Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` -} +// Defines values for PostRpcPgpArmorHeadersParamsPrefer. +const ( + PostRpcPgpArmorHeadersParamsPreferParamsSingleObject PostRpcPgpArmorHeadersParamsPrefer = "params=single-object" +) -// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. -type PatchPortalPlansParamsPrefer string +// Defines values for PostRpcPgpKeyIdParamsPrefer. +const ( + ParamsSingleObject PostRpcPgpKeyIdParamsPrefer = "params=single-object" +) -// PostPortalPlansParams defines parameters for PostPortalPlans. -type PostPortalPlansParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` +// PreferParams defines model for preferParams. +type PreferParams string - // Prefer Preference - Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` +// Args defines model for Args. +type Args struct { + Empty string `json:""` } -// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. -type PostPortalPlansParamsPrefer string - -// GetPortalWorkersAccountDataParams defines parameters for GetPortalWorkersAccountData. -type GetPortalWorkersAccountDataParams struct { - PortalAccountId *RowFilterPortalWorkersAccountDataPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` - UserAccountName *RowFilterPortalWorkersAccountDataUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` - PortalPlanType *RowFilterPortalWorkersAccountDataPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` - BillingType *RowFilterPortalWorkersAccountDataBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` - PortalAccountUserLimit *RowFilterPortalWorkersAccountDataPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` - GcpEntitlementId *RowFilterPortalWorkersAccountDataGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` - OwnerEmail *RowFilterPortalWorkersAccountDataOwnerEmail `form:"owner_email,omitempty" json:"owner_email,omitempty"` - OwnerUserId *RowFilterPortalWorkersAccountDataOwnerUserId `form:"owner_user_id,omitempty" json:"owner_user_id,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetPortalWorkersAccountDataParamsPrefer `json:"Prefer,omitempty"` +// Args2 defines model for Args2. +type Args2 struct { + Empty string `json:""` } -// GetPortalWorkersAccountDataParamsPrefer defines parameters for GetPortalWorkersAccountData. -type GetPortalWorkersAccountDataParamsPrefer string - // GetRpcArmorParams defines parameters for GetRpcArmor. type GetRpcArmorParams struct { Empty string `form:"" json:""` @@ -1715,408 +214,6 @@ type PostRpcPgpKeyIdParams struct { // PostRpcPgpKeyIdParamsPrefer defines parameters for PostRpcPgpKeyId. type PostRpcPgpKeyIdParamsPrefer string -// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. -type DeleteServiceEndpointsParamsPrefer string - -// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. -type GetServiceEndpointsParamsPrefer string - -// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParams struct { - EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` - ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` - CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. -type PatchServiceEndpointsParamsPrefer string - -// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. -type PostServiceEndpointsParamsPrefer string - -// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. -type DeleteServiceFallbacksParamsPrefer string - -// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. -type GetServiceFallbacksParamsPrefer string - -// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParams struct { - ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` - ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` - CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. -type PatchServiceFallbacksParamsPrefer string - -// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. -type PostServiceFallbacksParamsPrefer string - -// DeleteServicesParams defines parameters for DeleteServices. -type DeleteServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` - StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` - StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// DeleteServicesParamsPrefer defines parameters for DeleteServices. -type DeleteServicesParamsPrefer string - -// GetServicesParams defines parameters for GetServices. -type GetServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` - StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` - StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Order Ordering - Order *Order `form:"order,omitempty" json:"order,omitempty"` - - // Offset Limiting and Pagination - Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` - - // Limit Limiting and Pagination - Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` - - // Range Limiting and Pagination - Range *Range `json:"Range,omitempty"` - - // RangeUnit Limiting and Pagination - RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` - - // Prefer Preference - Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// GetServicesParamsPrefer defines parameters for GetServices. -type GetServicesParamsPrefer string - -// PatchServicesParams defines parameters for PatchServices. -type PatchServicesParams struct { - ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` - ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` - - // ComputeUnitsPerRelay Cost in compute units for each relay - ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` - - // ServiceDomains Valid domains for this service - ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` - ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` - NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` - Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` - Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` - ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` - QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` - HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` - SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` - PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` - StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` - StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` - DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` - CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` - - // Prefer Preference - Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PatchServicesParamsPrefer defines parameters for PatchServices. -type PatchServicesParamsPrefer string - -// PostServicesParams defines parameters for PostServices. -type PostServicesParams struct { - // Select Filtering Columns - Select *Select `form:"select,omitempty" json:"select,omitempty"` - - // Prefer Preference - Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` -} - -// PostServicesParamsPrefer defines parameters for PostServices. -type PostServicesParamsPrefer string - -// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. -type PatchNetworksJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. -type PostNetworksJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks - -// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks - -// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. -type PatchOrganizationsJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. -type PostOrganizationsJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations - -// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations - -// PatchPortalAccountRbacJSONRequestBody defines body for PatchPortalAccountRbac for application/json ContentType. -type PatchPortalAccountRbacJSONRequestBody = PortalAccountRbac - -// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json ContentType. -type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac - -// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac - -// PostPortalAccountRbacJSONRequestBody defines body for PostPortalAccountRbac for application/json ContentType. -type PostPortalAccountRbacJSONRequestBody = PortalAccountRbac - -// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json ContentType. -type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac - -// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac - -// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. -type PatchPortalAccountsJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. -type PostPortalAccountsJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts - -// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts - -// PatchPortalApplicationRbacJSONRequestBody defines body for PatchPortalApplicationRbac for application/json ContentType. -type PatchPortalApplicationRbacJSONRequestBody = PortalApplicationRbac - -// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. -type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac - -// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac - -// PostPortalApplicationRbacJSONRequestBody defines body for PostPortalApplicationRbac for application/json ContentType. -type PostPortalApplicationRbacJSONRequestBody = PortalApplicationRbac - -// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. -type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac - -// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac - -// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. -type PatchPortalApplicationsJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. -type PostPortalApplicationsJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications - -// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications - -// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. -type PatchPortalPlansJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - -// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. -type PostPortalPlansJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans - -// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans - // PostRpcArmorJSONRequestBody defines body for PostRpcArmor for application/json ContentType. type PostRpcArmorJSONRequestBody PostRpcArmorJSONBody @@ -2170,57 +267,3 @@ type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody PostRpcPgpKeyId // PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcPgpKeyId for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedBody - -// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. -type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. -type PostServiceEndpointsJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints - -// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints - -// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. -type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. -type PostServiceFallbacksJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks - -// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks - -// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. -type PatchServicesJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services - -// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. -type PostServicesJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services - -// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. -type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES index 797bc5058..52ac2bbbf 100644 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -3,38 +3,16 @@ README.md package.json src/apis/IntrospectionApi.ts -src/apis/NetworksApi.ts -src/apis/OrganizationsApi.ts -src/apis/PortalAccountRbacApi.ts -src/apis/PortalAccountsApi.ts -src/apis/PortalApplicationRbacApi.ts -src/apis/PortalApplicationsApi.ts -src/apis/PortalPlansApi.ts -src/apis/PortalWorkersAccountDataApi.ts src/apis/RpcArmorApi.ts src/apis/RpcDearmorApi.ts src/apis/RpcGenRandomUuidApi.ts src/apis/RpcGenSaltApi.ts src/apis/RpcPgpArmorHeadersApi.ts src/apis/RpcPgpKeyIdApi.ts -src/apis/ServiceEndpointsApi.ts -src/apis/ServiceFallbacksApi.ts -src/apis/ServicesApi.ts src/apis/index.ts src/index.ts -src/models/Networks.ts -src/models/Organizations.ts -src/models/PortalAccountRbac.ts -src/models/PortalAccounts.ts -src/models/PortalApplicationRbac.ts -src/models/PortalApplications.ts -src/models/PortalPlans.ts -src/models/PortalWorkersAccountData.ts src/models/RpcArmorPostRequest.ts src/models/RpcGenSaltPostRequest.ts -src/models/ServiceEndpoints.ts -src/models/ServiceFallbacks.ts -src/models/Services.ts src/models/index.ts src/runtime.ts tsconfig.json diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts deleted file mode 100644 index 7ed2eea64..000000000 --- a/portal-db/sdk/typescript/src/apis/NetworksApi.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Networks, -} from '../models/index'; -import { - NetworksFromJSON, - NetworksToJSON, -} from '../models/index'; - -export interface NetworksDeleteRequest { - networkId?: string; - prefer?: NetworksDeletePreferEnum; -} - -export interface NetworksGetRequest { - networkId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: NetworksGetPreferEnum; -} - -export interface NetworksPatchRequest { - networkId?: string; - prefer?: NetworksPatchPreferEnum; - networks?: Networks; -} - -export interface NetworksPostRequest { - select?: string; - prefer?: NetworksPostPreferEnum; - networks?: Networks; -} - -/** - * - */ -export class NetworksApi extends runtime.BaseAPI { - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.networksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const NetworksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; -/** - * @export - */ -export const NetworksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; -/** - * @export - */ -export const NetworksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; -/** - * @export - */ -export const NetworksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts deleted file mode 100644 index 9944fa2cd..000000000 --- a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Organizations, -} from '../models/index'; -import { - OrganizationsFromJSON, - OrganizationsToJSON, -} from '../models/index'; - -export interface OrganizationsDeleteRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsDeletePreferEnum; -} - -export interface OrganizationsGetRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: OrganizationsGetPreferEnum; -} - -export interface OrganizationsPatchRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsPatchPreferEnum; - organizations?: Organizations; -} - -export interface OrganizationsPostRequest { - select?: string; - prefer?: OrganizationsPostPreferEnum; - organizations?: Organizations; -} - -/** - * - */ -export class OrganizationsApi extends runtime.BaseAPI { - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.organizationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const OrganizationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; -/** - * @export - */ -export const OrganizationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; -/** - * @export - */ -export const OrganizationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; -/** - * @export - */ -export const OrganizationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts deleted file mode 100644 index 79587e887..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccountRbac, -} from '../models/index'; -import { - PortalAccountRbacFromJSON, - PortalAccountRbacToJSON, -} from '../models/index'; - -export interface PortalAccountRbacDeleteRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacDeletePreferEnum; -} - -export interface PortalAccountRbacGetRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountRbacGetPreferEnum; -} - -export interface PortalAccountRbacPatchRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacPatchPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -export interface PortalAccountRbacPostRequest { - select?: string; - prefer?: PortalAccountRbacPostPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -/** - * - */ -export class PortalAccountRbacApi extends runtime.BaseAPI { - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts deleted file mode 100644 index f7db3d925..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccounts, -} from '../models/index'; -import { - PortalAccountsFromJSON, - PortalAccountsToJSON, -} from '../models/index'; - -export interface PortalAccountsDeleteRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsDeletePreferEnum; -} - -export interface PortalAccountsGetRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountsGetPreferEnum; -} - -export interface PortalAccountsPatchRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsPatchPreferEnum; - portalAccounts?: PortalAccounts; -} - -export interface PortalAccountsPostRequest { - select?: string; - prefer?: PortalAccountsPostPreferEnum; - portalAccounts?: PortalAccounts; -} - -/** - * - */ -export class PortalAccountsApi extends runtime.BaseAPI { - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPatchRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; -/** - * @export - */ -export const PortalAccountsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts deleted file mode 100644 index 05f0a6095..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplicationRbac, -} from '../models/index'; -import { - PortalApplicationRbacFromJSON, - PortalApplicationRbacToJSON, -} from '../models/index'; - -export interface PortalApplicationRbacDeleteRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacDeletePreferEnum; -} - -export interface PortalApplicationRbacGetRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationRbacGetPreferEnum; -} - -export interface PortalApplicationRbacPatchRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacPatchPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -export interface PortalApplicationRbacPostRequest { - select?: string; - prefer?: PortalApplicationRbacPostPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -/** - * - */ -export class PortalApplicationRbacApi extends runtime.BaseAPI { - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts deleted file mode 100644 index 4161669cc..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplications, -} from '../models/index'; -import { - PortalApplicationsFromJSON, - PortalApplicationsToJSON, -} from '../models/index'; - -export interface PortalApplicationsDeleteRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsDeletePreferEnum; -} - -export interface PortalApplicationsGetRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationsGetPreferEnum; -} - -export interface PortalApplicationsPatchRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsPatchPreferEnum; - portalApplications?: PortalApplications; -} - -export interface PortalApplicationsPostRequest { - select?: string; - prefer?: PortalApplicationsPostPreferEnum; - portalApplications?: PortalApplications; -} - -/** - * - */ -export class PortalApplicationsApi extends runtime.BaseAPI { - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts deleted file mode 100644 index 6400389ad..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalPlans, -} from '../models/index'; -import { - PortalPlansFromJSON, - PortalPlansToJSON, -} from '../models/index'; - -export interface PortalPlansDeleteRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansDeletePreferEnum; -} - -export interface PortalPlansGetRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalPlansGetPreferEnum; -} - -export interface PortalPlansPatchRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansPatchPreferEnum; - portalPlans?: PortalPlans; -} - -export interface PortalPlansPostRequest { - select?: string; - prefer?: PortalPlansPostPreferEnum; - portalPlans?: PortalPlans; -} - -/** - * - */ -export class PortalPlansApi extends runtime.BaseAPI { - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalPlansGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPatchRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalPlansDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; -/** - * @export - */ -export const PortalPlansGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; -/** - * @export - */ -export const PortalPlansPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; -/** - * @export - */ -export const PortalPlansPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts deleted file mode 100644 index a933445cb..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalWorkersAccountData, -} from '../models/index'; -import { - PortalWorkersAccountDataFromJSON, - PortalWorkersAccountDataToJSON, -} from '../models/index'; - -export interface PortalWorkersAccountDataGetRequest { - portalAccountId?: string; - userAccountName?: string; - portalPlanType?: string; - billingType?: string; - portalAccountUserLimit?: number; - gcpEntitlementId?: string; - ownerEmail?: string; - ownerUserId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalWorkersAccountDataGetPreferEnum; -} - -/** - * - */ -export class PortalWorkersAccountDataApi extends runtime.BaseAPI { - - /** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' - */ - async portalWorkersAccountDataGetRaw(requestParameters: PortalWorkersAccountDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['ownerEmail'] != null) { - queryParameters['owner_email'] = requestParameters['ownerEmail']; - } - - if (requestParameters['ownerUserId'] != null) { - queryParameters['owner_user_id'] = requestParameters['ownerUserId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_workers_account_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalWorkersAccountDataFromJSON)); - } - - /** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' - */ - async portalWorkersAccountDataGet(requestParameters: PortalWorkersAccountDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalWorkersAccountDataGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - -} - -/** - * @export - */ -export const PortalWorkersAccountDataGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalWorkersAccountDataGetPreferEnum = typeof PortalWorkersAccountDataGetPreferEnum[keyof typeof PortalWorkersAccountDataGetPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts deleted file mode 100644 index 9e4f193fc..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceEndpoints, -} from '../models/index'; -import { - ServiceEndpointsFromJSON, - ServiceEndpointsToJSON, -} from '../models/index'; - -export interface ServiceEndpointsDeleteRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsDeletePreferEnum; -} - -export interface ServiceEndpointsGetRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceEndpointsGetPreferEnum; -} - -export interface ServiceEndpointsPatchRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsPatchPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -export interface ServiceEndpointsPostRequest { - select?: string; - prefer?: ServiceEndpointsPostPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -/** - * - */ -export class ServiceEndpointsApi extends runtime.BaseAPI { - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceEndpointsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; -/** - * @export - */ -export const ServiceEndpointsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts deleted file mode 100644 index 1a5f43ac7..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceFallbacks, -} from '../models/index'; -import { - ServiceFallbacksFromJSON, - ServiceFallbacksToJSON, -} from '../models/index'; - -export interface ServiceFallbacksDeleteRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksDeletePreferEnum; -} - -export interface ServiceFallbacksGetRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceFallbacksGetPreferEnum; -} - -export interface ServiceFallbacksPatchRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksPatchPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -export interface ServiceFallbacksPostRequest { - select?: string; - prefer?: ServiceFallbacksPostPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -/** - * - */ -export class ServiceFallbacksApi extends runtime.BaseAPI { - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceFallbacksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; -/** - * @export - */ -export const ServiceFallbacksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts deleted file mode 100644 index 36471e815..000000000 --- a/portal-db/sdk/typescript/src/apis/ServicesApi.ts +++ /dev/null @@ -1,532 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Services, -} from '../models/index'; -import { - ServicesFromJSON, - ServicesToJSON, -} from '../models/index'; - -export interface ServicesDeleteRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesDeletePreferEnum; -} - -export interface ServicesGetRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServicesGetPreferEnum; -} - -export interface ServicesPatchRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesPatchPreferEnum; - services?: Services; -} - -export interface ServicesPostRequest { - select?: string; - prefer?: ServicesPostPreferEnum; - services?: Services; -} - -/** - * - */ -export class ServicesApi extends runtime.BaseAPI { - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.servicesGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServicesDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; -/** - * @export - */ -export const ServicesGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; -/** - * @export - */ -export const ServicesPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; -/** - * @export - */ -export const ServicesPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts index 7d4580df0..167659e57 100644 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -1,20 +1,9 @@ /* tslint:disable */ /* eslint-disable */ export * from './IntrospectionApi'; -export * from './NetworksApi'; -export * from './OrganizationsApi'; -export * from './PortalAccountRbacApi'; -export * from './PortalAccountsApi'; -export * from './PortalApplicationRbacApi'; -export * from './PortalApplicationsApi'; -export * from './PortalPlansApi'; -export * from './PortalWorkersAccountDataApi'; export * from './RpcArmorApi'; export * from './RpcDearmorApi'; export * from './RpcGenRandomUuidApi'; export * from './RpcGenSaltApi'; export * from './RpcPgpArmorHeadersApi'; export * from './RpcPgpKeyIdApi'; -export * from './ServiceEndpointsApi'; -export * from './ServiceFallbacksApi'; -export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts deleted file mode 100644 index 8ff34b54a..000000000 --- a/portal-db/sdk/typescript/src/models/Networks.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - * @export - * @interface Networks - */ -export interface Networks { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Networks - */ - networkId: string; -} - -/** - * Check if a given object implements the Networks interface. - */ -export function instanceOfNetworks(value: object): value is Networks { - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function NetworksFromJSON(json: any): Networks { - return NetworksFromJSONTyped(json, false); -} - -export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { - if (json == null) { - return json; - } - return { - - 'networkId': json['network_id'], - }; -} - -export function NetworksToJSON(json: any): Networks { - return NetworksToJSONTyped(json, false); -} - -export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'network_id': value['networkId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts deleted file mode 100644 index 3c35c6a79..000000000 --- a/portal-db/sdk/typescript/src/models/Organizations.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Companies or customer groups that can be attached to Portal Accounts - * @export - * @interface Organizations - */ -export interface Organizations { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof Organizations - */ - organizationId: number; - /** - * Name of the organization - * @type {string} - * @memberof Organizations - */ - organizationName: string; - /** - * Soft delete timestamp - * @type {string} - * @memberof Organizations - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Organizations interface. - */ -export function instanceOfOrganizations(value: object): value is Organizations { - if (!('organizationId' in value) || value['organizationId'] === undefined) return false; - if (!('organizationName' in value) || value['organizationName'] === undefined) return false; - return true; -} - -export function OrganizationsFromJSON(json: any): Organizations { - return OrganizationsFromJSONTyped(json, false); -} - -export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { - if (json == null) { - return json; - } - return { - - 'organizationId': json['organization_id'], - 'organizationName': json['organization_name'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function OrganizationsToJSON(json: any): Organizations { - return OrganizationsToJSONTyped(json, false); -} - -export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'organization_id': value['organizationId'], - 'organization_name': value['organizationName'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts deleted file mode 100644 index b605719a0..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User roles and permissions for specific portal accounts - * @export - * @interface PortalAccountRbac - */ -export interface PortalAccountRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalAccountRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalAccountRbac - */ - roleName: string; - /** - * - * @type {boolean} - * @memberof PortalAccountRbac - */ - userJoinedAccount?: boolean; -} - -/** - * Check if a given object implements the PortalAccountRbac interface. - */ -export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - if (!('roleName' in value) || value['roleName'] === undefined) return false; - return true; -} - -export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { - return PortalAccountRbacFromJSONTyped(json, false); -} - -export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalAccountId': json['portal_account_id'], - 'portalUserId': json['portal_user_id'], - 'roleName': json['role_name'], - 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], - }; -} - -export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { - return PortalAccountRbacToJSONTyped(json, false); -} - -export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_account_id': value['portalAccountId'], - 'portal_user_id': value['portalUserId'], - 'role_name': value['roleName'], - 'user_joined_account': value['userJoinedAccount'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts deleted file mode 100644 index ee2b80517..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccounts.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Multi-tenant accounts with plans and billing integration - * @export - * @interface PortalAccounts - */ -export interface PortalAccounts { - /** - * Unique identifier for the portal account - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalAccounts - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `organizations.organization_id`. - * @type {number} - * @memberof PortalAccounts - */ - organizationId?: number; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalAccounts - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - userAccountName?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - internalAccountName?: string; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - billingType?: string; - /** - * Stripe subscription identifier for billing - * @type {string} - * @memberof PortalAccounts - */ - stripeSubscriptionId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpAccountId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalAccountsPortalAccountUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalAccounts interface. - */ -export function instanceOfPortalAccounts(value: object): value is PortalAccounts { - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalAccountsFromJSON(json: any): PortalAccounts { - return PortalAccountsFromJSONTyped(json, false); -} - -export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'], - 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], - 'portalPlanType': json['portal_plan_type'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], - 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], - 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalAccountsToJSON(json: any): PortalAccounts { - return PortalAccountsToJSONTyped(json, false); -} - -export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'organization_id': value['organizationId'], - 'portal_plan_type': value['portalPlanType'], - 'user_account_name': value['userAccountName'], - 'internal_account_name': value['internalAccountName'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], - 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], - 'billing_type': value['billingType'], - 'stripe_subscription_id': value['stripeSubscriptionId'], - 'gcp_account_id': value['gcpAccountId'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts deleted file mode 100644 index 5216b4f8a..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User access controls for specific applications - * @export - * @interface PortalApplicationRbac - */ -export interface PortalApplicationRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalApplicationRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_applications.portal_application_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the PortalApplicationRbac interface. - */ -export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - return true; -} - -export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacFromJSONTyped(json, false); -} - -export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalApplicationId': json['portal_application_id'], - 'portalUserId': json['portal_user_id'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacToJSONTyped(json, false); -} - -export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_application_id': value['portalApplicationId'], - 'portal_user_id': value['portalUserId'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts deleted file mode 100644 index 08c5953bc..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplications.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Applications created within portal accounts with their own rate limits and settings - * @export - * @interface PortalApplications - */ -export interface PortalApplications { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalApplications - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalApplications - */ - portalAccountId: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationName?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - emoji?: string; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationDescription?: string; - /** - * - * @type {Array} - * @memberof PortalApplications - */ - favoriteServiceIds?: Array; - /** - * Hashed secret key for application authentication - * @type {string} - * @memberof PortalApplications - */ - secretKeyHash?: string; - /** - * - * @type {boolean} - * @memberof PortalApplications - */ - secretKeyRequired?: boolean; - /** - * - * @type {string} - * @memberof PortalApplications - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalApplications interface. - */ -export function instanceOfPortalApplications(value: object): value is PortalApplications { - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - return true; -} - -export function PortalApplicationsFromJSON(json: any): PortalApplications { - return PortalApplicationsFromJSONTyped(json, false); -} - -export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { - if (json == null) { - return json; - } - return { - - 'portalApplicationId': json['portal_application_id'], - 'portalAccountId': json['portal_account_id'], - 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], - 'emoji': json['emoji'] == null ? undefined : json['emoji'], - 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], - 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], - 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], - 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], - 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], - 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], - 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationsToJSON(json: any): PortalApplications { - return PortalApplicationsToJSONTyped(json, false); -} - -export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_application_id': value['portalApplicationId'], - 'portal_account_id': value['portalAccountId'], - 'portal_application_name': value['portalApplicationName'], - 'emoji': value['emoji'], - 'portal_application_user_limit': value['portalApplicationUserLimit'], - 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], - 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], - 'portal_application_description': value['portalApplicationDescription'], - 'favorite_service_ids': value['favoriteServiceIds'], - 'secret_key_hash': value['secretKeyHash'], - 'secret_key_required': value['secretKeyRequired'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts deleted file mode 100644 index d89b2b209..000000000 --- a/portal-db/sdk/typescript/src/models/PortalPlans.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available subscription plans for Portal Accounts - * @export - * @interface PortalPlans - */ -export interface PortalPlans { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalPlans - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalPlans - */ - portalPlanTypeDescription?: string; - /** - * Maximum usage allowed within the interval - * @type {number} - * @memberof PortalPlans - */ - planUsageLimit?: number; - /** - * - * @type {string} - * @memberof PortalPlans - */ - planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; - /** - * Rate limit in requests per second - * @type {number} - * @memberof PortalPlans - */ - planRateLimitRps?: number; - /** - * - * @type {number} - * @memberof PortalPlans - */ - planApplicationLimit?: number; -} - - -/** - * @export - */ -export const PortalPlansPlanUsageLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalPlans interface. - */ -export function instanceOfPortalPlans(value: object): value is PortalPlans { - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalPlansFromJSON(json: any): PortalPlans { - return PortalPlansFromJSONTyped(json, false); -} - -export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { - if (json == null) { - return json; - } - return { - - 'portalPlanType': json['portal_plan_type'], - 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], - 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], - 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], - 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], - 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], - }; -} - -export function PortalPlansToJSON(json: any): PortalPlans { - return PortalPlansToJSONTyped(json, false); -} - -export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_plan_type': value['portalPlanType'], - 'portal_plan_type_description': value['portalPlanTypeDescription'], - 'plan_usage_limit': value['planUsageLimit'], - 'plan_usage_limit_interval': value['planUsageLimitInterval'], - 'plan_rate_limit_rps': value['planRateLimitRps'], - 'plan_application_limit': value['planApplicationLimit'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts deleted file mode 100644 index 44834dcec..000000000 --- a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' - * @export - * @interface PortalWorkersAccountData - */ -export interface PortalWorkersAccountData { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalWorkersAccountData - */ - portalAccountId?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - userAccountName?: string; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalWorkersAccountData - */ - portalPlanType?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - billingType?: string; - /** - * - * @type {number} - * @memberof PortalWorkersAccountData - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - ownerEmail?: string; - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalWorkersAccountData - */ - ownerUserId?: string; -} - -/** - * Check if a given object implements the PortalWorkersAccountData interface. - */ -export function instanceOfPortalWorkersAccountData(value: object): value is PortalWorkersAccountData { - return true; -} - -export function PortalWorkersAccountDataFromJSON(json: any): PortalWorkersAccountData { - return PortalWorkersAccountDataFromJSONTyped(json, false); -} - -export function PortalWorkersAccountDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalWorkersAccountData { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'] == null ? undefined : json['portal_account_id'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'portalPlanType': json['portal_plan_type'] == null ? undefined : json['portal_plan_type'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'ownerEmail': json['owner_email'] == null ? undefined : json['owner_email'], - 'ownerUserId': json['owner_user_id'] == null ? undefined : json['owner_user_id'], - }; -} - -export function PortalWorkersAccountDataToJSON(json: any): PortalWorkersAccountData { - return PortalWorkersAccountDataToJSONTyped(json, false); -} - -export function PortalWorkersAccountDataToJSONTyped(value?: PortalWorkersAccountData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'user_account_name': value['userAccountName'], - 'portal_plan_type': value['portalPlanType'], - 'billing_type': value['billingType'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'owner_email': value['ownerEmail'], - 'owner_user_id': value['ownerUserId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts deleted file mode 100644 index 516acad4a..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available endpoint types for each service - * @export - * @interface ServiceEndpoints - */ -export interface ServiceEndpoints { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceEndpoints - */ - endpointId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceEndpoints - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - endpointType?: ServiceEndpointsEndpointTypeEnum; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const ServiceEndpointsEndpointTypeEnum = { - CometBft: 'cometBFT', - Cosmos: 'cosmos', - Rest: 'REST', - JsonRpc: 'JSON-RPC', - Wss: 'WSS', - GRpc: 'gRPC' -} as const; -export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; - - -/** - * Check if a given object implements the ServiceEndpoints interface. - */ -export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { - if (!('endpointId' in value) || value['endpointId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - return true; -} - -export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { - return ServiceEndpointsFromJSONTyped(json, false); -} - -export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { - if (json == null) { - return json; - } - return { - - 'endpointId': json['endpoint_id'], - 'serviceId': json['service_id'], - 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { - return ServiceEndpointsToJSONTyped(json, false); -} - -export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'endpoint_id': value['endpointId'], - 'service_id': value['serviceId'], - 'endpoint_type': value['endpointType'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts deleted file mode 100644 index a10559ad2..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Fallback URLs for services when primary endpoints fail - * @export - * @interface ServiceFallbacks - */ -export interface ServiceFallbacks { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceFallbacks - */ - serviceFallbackId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceFallbacks - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - fallbackUrl: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the ServiceFallbacks interface. - */ -export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { - if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; - return true; -} - -export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { - return ServiceFallbacksFromJSONTyped(json, false); -} - -export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { - if (json == null) { - return json; - } - return { - - 'serviceFallbackId': json['service_fallback_id'], - 'serviceId': json['service_id'], - 'fallbackUrl': json['fallback_url'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { - return ServiceFallbacksToJSONTyped(json, false); -} - -export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_fallback_id': value['serviceFallbackId'], - 'service_id': value['serviceId'], - 'fallback_url': value['fallbackUrl'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts deleted file mode 100644 index 766a36099..000000000 --- a/portal-db/sdk/typescript/src/models/Services.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain services from the Pocket Network - * @export - * @interface Services - */ -export interface Services { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Services - */ - serviceId: string; - /** - * - * @type {string} - * @memberof Services - */ - serviceName: string; - /** - * Cost in compute units for each relay - * @type {number} - * @memberof Services - */ - computeUnitsPerRelay?: number; - /** - * Valid domains for this service - * @type {Array} - * @memberof Services - */ - serviceDomains: Array; - /** - * - * @type {string} - * @memberof Services - */ - serviceOwnerAddress?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Services - */ - networkId?: string; - /** - * - * @type {boolean} - * @memberof Services - */ - active?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - beta?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - comingSoon?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - qualityFallbackEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - hardFallbackEnabled?: boolean; - /** - * - * @type {string} - * @memberof Services - */ - svgIcon?: string; - /** - * - * @type {string} - * @memberof Services - */ - publicEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusQuery?: string; - /** - * - * @type {string} - * @memberof Services - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Services interface. - */ -export function instanceOfServices(value: object): value is Services { - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('serviceName' in value) || value['serviceName'] === undefined) return false; - if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; - return true; -} - -export function ServicesFromJSON(json: any): Services { - return ServicesFromJSONTyped(json, false); -} - -export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { - if (json == null) { - return json; - } - return { - - 'serviceId': json['service_id'], - 'serviceName': json['service_name'], - 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], - 'serviceDomains': json['service_domains'], - 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], - 'networkId': json['network_id'] == null ? undefined : json['network_id'], - 'active': json['active'] == null ? undefined : json['active'], - 'beta': json['beta'] == null ? undefined : json['beta'], - 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], - 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], - 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], - 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], - 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], - 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], - 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServicesToJSON(json: any): Services { - return ServicesToJSONTyped(json, false); -} - -export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_id': value['serviceId'], - 'service_name': value['serviceName'], - 'compute_units_per_relay': value['computeUnitsPerRelay'], - 'service_domains': value['serviceDomains'], - 'service_owner_address': value['serviceOwnerAddress'], - 'network_id': value['networkId'], - 'active': value['active'], - 'beta': value['beta'], - 'coming_soon': value['comingSoon'], - 'quality_fallback_enabled': value['qualityFallbackEnabled'], - 'hard_fallback_enabled': value['hardFallbackEnabled'], - 'svg_icon': value['svgIcon'], - 'public_endpoint_url': value['publicEndpointUrl'], - 'status_endpoint_url': value['statusEndpointUrl'], - 'status_query': value['statusQuery'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts index 5edb1a98a..93ae61570 100644 --- a/portal-db/sdk/typescript/src/models/index.ts +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -1,15 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Networks'; -export * from './Organizations'; -export * from './PortalAccountRbac'; -export * from './PortalAccounts'; -export * from './PortalApplicationRbac'; -export * from './PortalApplications'; -export * from './PortalPlans'; -export * from './PortalWorkersAccountData'; export * from './RpcArmorPostRequest'; export * from './RpcGenSaltPostRequest'; -export * from './ServiceEndpoints'; -export * from './ServiceFallbacks'; -export * from './Services'; From 57aaca364686eac9c2f9e07352c66ea43792d29f Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 8 Oct 2025 19:20:37 +0100 Subject: [PATCH 37/43] fix legacy owner filter --- portal-db/api/codegen/generate-sdks.sh | 2 +- portal-db/schema/002_postgrest_init.sql | 11 ++++++++++- portal-db/schema/003_aux_services_queries.sql | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 13ffec66b..08e8e579d 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -145,7 +145,7 @@ rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" # Generate JWT token for authenticated access to get all endpoints echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." -JWT_TOKEN=$(cd ../scripts && ./gen-jwt.sh portal_db_admin 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) +JWT_TOKEN=$(cd ../scripts && ./postgrest-gen-jwt.sh portal_db_admin 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) if [ -z "$JWT_TOKEN" ]; then echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." diff --git a/portal-db/schema/002_postgrest_init.sql b/portal-db/schema/002_postgrest_init.sql index 09e867174..65d1ecd17 100644 --- a/portal-db/schema/002_postgrest_init.sql +++ b/portal-db/schema/002_postgrest_init.sql @@ -83,7 +83,8 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE portal_accounts, portal_account_rbac, portal_applications, - portal_application_rbac + portal_application_rbac, + portal_users TO portal_db_admin; -- Read-only access to business data for reader role. @@ -108,6 +109,7 @@ ALTER TABLE portal_accounts ENABLE ROW LEVEL SECURITY; ALTER TABLE portal_account_rbac ENABLE ROW LEVEL SECURITY; ALTER TABLE portal_applications ENABLE ROW LEVEL SECURITY; ALTER TABLE portal_application_rbac ENABLE ROW LEVEL SECURITY; +ALTER TABLE portal_users ENABLE ROW LEVEL SECURITY; -- Organizations CREATE POLICY organizations_admin_all ON organizations @@ -168,3 +170,10 @@ CREATE POLICY portal_application_rbac_reader_select ON portal_application_rbac FOR SELECT TO portal_db_reader USING (TRUE); + +-- Portal users +CREATE POLICY portal_users_admin_all ON portal_users + FOR ALL + TO portal_db_admin + USING (TRUE) + WITH CHECK (TRUE); \ No newline at end of file diff --git a/portal-db/schema/003_aux_services_queries.sql b/portal-db/schema/003_aux_services_queries.sql index 867fccb3e..2df47ae0a 100644 --- a/portal-db/schema/003_aux_services_queries.sql +++ b/portal-db/schema/003_aux_services_queries.sql @@ -27,7 +27,7 @@ INNER JOIN portal_users pu ON par.portal_user_id = pu.portal_user_id WHERE pa.deleted_at IS NULL AND pu.deleted_at IS NULL - AND par.role_name = 'OWNER'; + AND par.role_name = 'LEGACY_OWNER'; -- Grant select permissions to both reader and admin roles GRANT SELECT ON portal_workers_account_data TO portal_db_reader, portal_db_admin; From 59f4ba16e6d39cc27e3ee76b25d59d923ef698db Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Wed, 8 Oct 2025 19:57:52 +0100 Subject: [PATCH 38/43] fix sdk generation --- portal-db/api/codegen/generate-openapi.sh | 39 +- portal-db/api/codegen/generate-sdks.sh | 85 +- portal-db/api/openapi/openapi.json | 5068 ++++- portal-db/schema/003_aux_services_queries.sql | 4 +- portal-db/sdk/go/client.go | 15252 +++++++++++++++- portal-db/sdk/go/models.go | 2199 ++- .../sdk/typescript/.openapi-generator/FILES | 24 + .../sdk/typescript/src/apis/NetworksApi.ts | 277 + .../typescript/src/apis/OrganizationsApi.ts | 337 + .../src/apis/PortalAccountRbacApi.ts | 337 + .../typescript/src/apis/PortalAccountsApi.ts | 487 + .../src/apis/PortalApplicationRbacApi.ts | 337 + .../src/apis/PortalApplicationsApi.ts | 472 + .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 + .../sdk/typescript/src/apis/PortalUsersApi.ts | 367 + .../src/apis/PortalWorkersAccountDataApi.ts | 152 + .../src/apis/ServiceEndpointsApi.ts | 337 + .../src/apis/ServiceFallbacksApi.ts | 337 + .../sdk/typescript/src/apis/ServicesApi.ts | 532 + portal-db/sdk/typescript/src/apis/index.ts | 12 + .../sdk/typescript/src/models/Networks.ts | 67 + .../typescript/src/models/Organizations.ts | 100 + .../src/models/PortalAccountRbac.ts | 104 + .../typescript/src/models/PortalAccounts.ts | 196 + .../src/models/PortalApplicationRbac.ts | 103 + .../src/models/PortalApplications.ts | 185 + .../sdk/typescript/src/models/PortalPlans.ts | 119 + .../sdk/typescript/src/models/PortalUsers.ts | 116 + .../src/models/PortalWorkersAccountData.ts | 124 + .../typescript/src/models/ServiceEndpoints.ts | 116 + .../typescript/src/models/ServiceFallbacks.ts | 102 + .../sdk/typescript/src/models/Services.ts | 206 + portal-db/sdk/typescript/src/models/index.ts | 12 + 33 files changed, 26958 insertions(+), 1599 deletions(-) create mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalUsersApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts create mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts create mode 100644 portal-db/sdk/typescript/src/models/Networks.ts create mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalUsers.ts create mode 100644 portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts create mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts create mode 100644 portal-db/sdk/typescript/src/models/Services.ts diff --git a/portal-db/api/codegen/generate-openapi.sh b/portal-db/api/codegen/generate-openapi.sh index bd75927c7..3ac00297b 100755 --- a/portal-db/api/codegen/generate-openapi.sh +++ b/portal-db/api/codegen/generate-openapi.sh @@ -62,10 +62,43 @@ while [ $attempt -le $max_attempts ]; do ((attempt++)) done -# Fetch OpenAPI specification +# Fetch OpenAPI specification (Swagger 2.0 format from PostgREST) echo -e "${BLUE}๐Ÿ“ฅ Fetching OpenAPI specification...${RESET}" -if curl -s -f -H "Accept: application/openapi+json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} "$POSTGREST_URL/" -o "$OUTPUT_FILE"; then - echo -e "${GREEN}โœ… OpenAPI specification saved to: ${CYAN}$OUTPUT_FILE${RESET}" +SWAGGER_FILE="${OUTPUT_FILE%.json}-swagger.json" + +if curl -s -f -H "Accept: application/openapi+json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} "$POSTGREST_URL/" -o "$SWAGGER_FILE"; then + echo -e "${GREEN}โœ… Swagger 2.0 specification fetched${RESET}" + + # Convert Swagger 2.0 to OpenAPI 3.x + echo -e "${BLUE}๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x...${RESET}" + + # Check if swagger2openapi is available + if ! command -v swagger2openapi >/dev/null 2>&1; then + echo -e "${BLUE}๐Ÿ“ฆ Installing swagger2openapi converter...${RESET}" + if command -v npm >/dev/null 2>&1; then + npm install -g swagger2openapi + else + echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${RESET}" + echo " - Mac: brew install node" + echo " - Or download from: https://nodejs.org/" + exit 1 + fi + fi + + if ! swagger2openapi "$SWAGGER_FILE" -o "$OUTPUT_FILE"; then + echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${RESET}" + exit 1 + fi + + # Fix boolean format issues in the converted spec + echo -e "${BLUE}๐Ÿ”ง Fixing boolean format issues...${RESET}" + sed -i.bak 's/"format": "boolean",//g' "$OUTPUT_FILE" + rm -f "${OUTPUT_FILE}.bak" + + # Clean up temporary Swagger file + rm -f "$SWAGGER_FILE" + + echo -e "${GREEN}โœ… OpenAPI 3.x specification saved to: ${CYAN}$OUTPUT_FILE${RESET}" # Pretty print the JSON if command -v jq >/dev/null 2>&1; then diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 08e8e579d..5ba3f4f95 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -9,13 +9,11 @@ set -e # Configuration OPENAPI_DIR="../openapi" -OPENAPI_V2_FILE="$OPENAPI_DIR/openapi-v2.json" OPENAPI_V3_FILE="$OPENAPI_DIR/openapi.json" GO_OUTPUT_DIR="../../sdk/go" TS_OUTPUT_DIR="../../sdk/typescript" CONFIG_MODELS="./codegen-models.yaml" CONFIG_CLIENT="./codegen-client.yaml" -POSTGREST_URL="http://localhost:3000" # Colors for output RED='\033[0;31m' @@ -106,18 +104,6 @@ fi echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" -# Check if PostgREST is running -echo "๐ŸŒ Checking PostgREST availability..." -if ! curl -s --connect-timeout 5 "$POSTGREST_URL" >/dev/null 2>&1; then - echo -e "${RED}โŒ PostgREST is not accessible at $POSTGREST_URL${NC}" - echo " Please ensure PostgREST is running:" - echo " cd .. && docker compose up -d" - echo " cd api && docker compose up -d" - exit 1 -fi - -echo -e "${GREEN}โœ… PostgREST is accessible at $POSTGREST_URL${NC}" - # Check if configuration files exist for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do if [ ! -f "$config_file" ]; then @@ -130,77 +116,20 @@ done echo -e "${GREEN}โœ… Configuration files found: models, client${NC}" # ============================================================================ -# PHASE 2: SPEC RETRIEVAL & CONVERSION +# PHASE 2: OPENAPI SPEC GENERATION # ============================================================================ echo "" -echo -e "${BLUE}๐Ÿ“‹ Phase 2: Spec Retrieval & Conversion${NC}" - -# Create openapi directory if it doesn't exist -mkdir -p "$OPENAPI_DIR" - -# Clean any existing files to start fresh -echo "๐Ÿงน Cleaning previous OpenAPI files..." -rm -f "$OPENAPI_V2_FILE" "$OPENAPI_V3_FILE" - -# Generate JWT token for authenticated access to get all endpoints -echo "๐Ÿ”‘ Generating JWT token for authenticated OpenAPI spec..." -JWT_TOKEN=$(cd ../scripts && ./postgrest-gen-jwt.sh portal_db_admin 2>/dev/null | grep -A1 "๐ŸŽŸ๏ธ Token:" | tail -1) - -if [ -z "$JWT_TOKEN" ]; then - echo "โš ๏ธ Could not generate JWT token, fetching public endpoints only..." - AUTH_HEADER="" -else - echo "โœ… JWT token generated, will fetch all endpoints (public + protected)" - AUTH_HEADER="Authorization: Bearer $JWT_TOKEN" -fi - -# Fetch OpenAPI spec from PostgREST (Swagger 2.0 format) -echo "๐Ÿ“ฅ Fetching OpenAPI specification from PostgREST..." -if ! curl -s "$POSTGREST_URL" -H "Accept: application/openapi+json" ${AUTH_HEADER:+-H "$AUTH_HEADER"} > "$OPENAPI_V2_FILE"; then - echo -e "${RED}โŒ Failed to fetch OpenAPI specification from $POSTGREST_URL${NC}" - exit 1 -fi +echo -e "${BLUE}๐Ÿ“‹ Phase 2: OpenAPI Spec Generation${NC}" -# Verify the file was created and has content -if [ ! -f "$OPENAPI_V2_FILE" ] || [ ! -s "$OPENAPI_V2_FILE" ]; then - echo -e "${RED}โŒ OpenAPI specification file is empty or missing${NC}" +# Generate OpenAPI specification using the dedicated script +echo "๐Ÿ“ Generating OpenAPI specification..." +if ! ./generate-openapi.sh; then + echo -e "${RED}โŒ Failed to generate OpenAPI specification${NC}" exit 1 fi -echo -e "${GREEN}โœ… Swagger 2.0 specification saved to: $OPENAPI_V2_FILE${NC}" - -# Convert Swagger 2.0 to OpenAPI 3.x -echo "๐Ÿ”„ Converting Swagger 2.0 to OpenAPI 3.x..." - -# Check if swagger2openapi is available -if ! command -v swagger2openapi >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing swagger2openapi converter..." - if command -v npm >/dev/null 2>&1; then - npm install -g swagger2openapi - else - echo -e "${RED}โŒ npm not found. Please install Node.js and npm first.${NC}" - echo " - Mac: brew install node" - echo " - Or download from: https://nodejs.org/" - exit 1 - fi -fi - -if ! swagger2openapi "$OPENAPI_V2_FILE" -o "$OPENAPI_V3_FILE"; then - echo -e "${RED}โŒ Failed to convert Swagger 2.0 to OpenAPI 3.x${NC}" - exit 1 -fi - -# Fix boolean format issues in the converted spec (in place) -echo "๐Ÿ”ง Fixing boolean format issues..." -sed -i.bak 's/"format": "boolean",//g' "$OPENAPI_V3_FILE" -rm -f "${OPENAPI_V3_FILE}.bak" - -# Remove the temporary Swagger 2.0 file since we only need the OpenAPI 3.x version -echo "๐Ÿงน Cleaning temporary Swagger 2.0 file..." -rm -f "$OPENAPI_V2_FILE" - -echo -e "${GREEN}โœ… OpenAPI 3.x specification ready: $OPENAPI_V3_FILE${NC}" +echo -e "${GREEN}โœ… OpenAPI specification ready: $OPENAPI_V3_FILE${NC}" # ============================================================================ # PHASE 3: SDK GENERATION diff --git a/portal-db/api/openapi/openapi.json b/portal-db/api/openapi/openapi.json index e1a15b69d..39317408f 100644 --- a/portal-db/api/openapi/openapi.json +++ b/portal-db/api/openapi/openapi.json @@ -1,535 +1,4587 @@ { - "openapi": "3.0.0", - "info": { - "description": "", - "title": "standard public schema", - "version": "12.0.2 (a4e00ff)" + "openapi": "3.0.0", + "info": { + "description": "", + "title": "standard public schema", + "version": "12.0.2 (a4e00ff)" + }, + "paths": { + "/": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "OpenAPI description (this document)", + "tags": [ + "Introspection" + ] + } }, - "paths": { - "/": { - "get": { - "responses": { - "200": { - "description": "OK" - } - }, - "summary": "OpenAPI description (this document)", - "tags": [ - "Introspection" - ] - } - }, - "/rpc/gen_salt": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_salt" - ] - } - }, - "/rpc/pgp_armor_headers": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_armor_headers" - ] - } - }, - "/rpc/armor": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "bytea" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) armor" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) armor" - ] - } - }, - "/rpc/pgp_key_id": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "bytea" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) pgp_key_id" - ] - } - }, - "/rpc/dearmor": { - "get": { - "parameters": [ - { - "in": "query", - "name": "", - "required": true, - "schema": { - "type": "string", - "format": "text" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) dearmor" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Args2" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) dearmor" - ] - } - }, - "/rpc/gen_random_uuid": { - "get": { - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_random_uuid" - ] - }, - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/preferParams" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "type": "object" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "type": "object" - } - }, - "text/csv": { - "schema": { - "type": "object" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - }, - "tags": [ - "(rpc) gen_random_uuid" - ] + "/service_fallbacks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_fallbacks" + }, + "type": "array" + } + } } - } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_fallback_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.fallback_url" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_fallbacks.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_fallbacks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Fallback URLs for services when primary endpoints fail", + "tags": [ + "service_fallbacks" + ] + } }, - "externalDocs": { - "description": "PostgREST Documentation", - "url": "https://postgrest.org/en/v12.0/api.html" + "/portal_application_rbac": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_application_rbac" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_application_rbac" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_application_rbac.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_application_rbac" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User access controls for specific applications", + "tags": [ + "portal_application_rbac" + ] + } }, - "servers": [ - { - "url": "http://localhost:3000" - } - ], - "components": { - "parameters": { - "preferParams": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "params=single-object" - ] + "/portal_plans": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" } - }, - "preferReturn": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none" - ] + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" } - }, - "preferCount": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", + }, + "application/vnd.pgrst.object+json": { "schema": { - "type": "string", - "enum": [ - "count=none" - ] + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" } - }, - "preferPost": { - "name": "Prefer", - "description": "Preference", - "required": false, - "in": "header", - "schema": { - "type": "string", - "enum": [ - "return=representation", - "return=minimal", - "return=none", - "resolution=ignore-duplicates", - "resolution=merge-duplicates" - ] + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_plans" + }, + "type": "array" } - }, - "select": { - "name": "select", - "description": "Filtering Columns", - "required": false, - "in": "query", + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.portal_plan_type_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_usage_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_rate_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_plans.plan_application_limit" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_plans" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available subscription plans for Portal Accounts", + "tags": [ + "portal_plans" + ] + } + }, + "/portal_users": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_email" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.signed_up" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_admin" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/portal_users" + }, + "type": "array" } - }, - "on_conflict": { - "name": "on_conflict", - "description": "On Conflict", - "required": false, - "in": "query", + }, + "application/vnd.pgrst.object+json;nulls=stripped": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/portal_users" + }, + "type": "array" } - }, - "order": { - "name": "order", - "description": "Ordering", - "required": false, - "in": "query", + }, + "application/vnd.pgrst.object+json": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/portal_users" + }, + "type": "array" } - }, - "range": { - "name": "Range", - "description": "Limiting and Pagination", - "required": false, - "in": "header", + }, + "text/csv": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/portal_users" + }, + "type": "array" } - }, - "rangeUnit": { - "name": "Range-Unit", - "description": "Limiting and Pagination", - "required": false, - "in": "header", + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Users who can access the portal and belong to multiple accounts", + "tags": [ + "portal_users" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_users" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Users who can access the portal and belong to multiple accounts", + "tags": [ + "portal_users" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_email" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.signed_up" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_admin" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Users who can access the portal and belong to multiple accounts", + "tags": [ + "portal_users" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_user_email" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.signed_up" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.portal_admin" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_users.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_users" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Users who can access the portal and belong to multiple accounts", + "tags": [ + "portal_users" + ] + } + }, + "/portal_applications": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { - "type": "string", - "default": "items" + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" } - }, - "offset": { - "name": "offset", - "description": "Limiting and Pagination", - "required": false, - "in": "query", + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_applications" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_applications" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.emoji" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.portal_application_description" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.favorite_service_ids" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_hash" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.secret_key_required" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_applications.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_applications" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Applications created within portal accounts with their own rate limits and settings", + "tags": [ + "portal_applications" + ] + } + }, + "/services": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/services" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.services.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_name" + }, + { + "$ref": "#/components/parameters/rowFilter.services.compute_units_per_relay" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_domains" + }, + { + "$ref": "#/components/parameters/rowFilter.services.service_owner_address" + }, + { + "$ref": "#/components/parameters/rowFilter.services.network_id" + }, + { + "$ref": "#/components/parameters/rowFilter.services.active" + }, + { + "$ref": "#/components/parameters/rowFilter.services.beta" + }, + { + "$ref": "#/components/parameters/rowFilter.services.coming_soon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.quality_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.hard_fallback_enabled" + }, + { + "$ref": "#/components/parameters/rowFilter.services.svg_icon" + }, + { + "$ref": "#/components/parameters/rowFilter.services.public_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_endpoint_url" + }, + { + "$ref": "#/components/parameters/rowFilter.services.status_query" + }, + { + "$ref": "#/components/parameters/rowFilter.services.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.services.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/services" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain services from the Pocket Network", + "tags": [ + "services" + ] + } + }, + "/portal_accounts": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_accounts" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.internal_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_interval" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.portal_account_user_limit_rps" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.stripe_subscription_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_accounts.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_accounts" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Multi-tenant accounts with plans and billing integration", + "tags": [ + "portal_accounts" + ] + } + }, + "/organizations": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/organizations" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_id" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.organization_name" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.deleted_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.organizations.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/organizations" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Companies or customer groups that can be attached to Portal Accounts", + "tags": [ + "organizations" + ] + } + }, + "/networks": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/networks" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.networks.network_id" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/networks" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "tags": [ + "networks" + ] + } + }, + "/portal_workers_account_data": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.user_account_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_plan_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.billing_type" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.portal_account_user_limit" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.gcp_entitlement_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_email" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_workers_account_data.owner_user_id" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_workers_account_data" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", + "tags": [ + "portal_workers_account_data" + ] + } + }, + "/portal_account_rbac": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/portal_account_rbac" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_account_rbac" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_account_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.portal_user_id" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.role_name" + }, + { + "$ref": "#/components/parameters/rowFilter.portal_account_rbac.user_joined_account" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/portal_account_rbac" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "User roles and permissions for specific portal accounts", + "tags": [ + "portal_account_rbac" + ] + } + }, + "/service_endpoints": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/range" + }, + { + "$ref": "#/components/parameters/rangeUnit" + }, + { + "$ref": "#/components/parameters/offset" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/preferCount" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/service_endpoints" + }, + "type": "array" + } + } + } + }, + "206": { + "description": "Partial Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/select" + }, + { + "$ref": "#/components/parameters/preferPost" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.service_id" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.endpoint_type" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.created_at" + }, + { + "$ref": "#/components/parameters/rowFilter.service_endpoints.updated_at" + }, + { + "$ref": "#/components/parameters/preferReturn" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/service_endpoints" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Available endpoint types for each service", + "tags": [ + "service_endpoints" + ] + } + }, + "/rpc/gen_salt": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_salt" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_salt" + ] + } + }, + "/rpc/pgp_armor_headers": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_armor_headers" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_armor_headers" + ] + } + }, + "/rpc/armor": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) armor" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) armor" + ] + } + }, + "/rpc/pgp_key_id": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "bytea" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_key_id" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) pgp_key_id" + ] + } + }, + "/rpc/dearmor": { + "get": { + "parameters": [ + { + "in": "query", + "name": "", + "required": true, + "schema": { + "type": "string", + "format": "text" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) dearmor" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Args2" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) dearmor" + ] + } + }, + "/rpc/gen_random_uuid": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_random_uuid" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/preferParams" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "type": "object" + } }, - "limit": { - "name": "limit", - "description": "Limiting and Pagination", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - } - }, - "requestBodies": { - "Args": { - "content": { - "application/json": { - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "text/csv": { - "schema": { - "properties": { - "": { - "format": "bytea", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - } - }, - "required": true + "application/vnd.pgrst.object+json": { + "schema": { + "type": "object" + } }, - "Args2": { - "content": { - "application/json": { - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "application/vnd.pgrst.object+json;nulls=stripped": { - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "application/vnd.pgrst.object+json": { - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - }, - "text/csv": { - "schema": { - "properties": { - "": { - "format": "text", - "type": "string" - } - }, - "required": [ - "" - ], - "type": "object" - } - } - }, - "required": true + "text/csv": { + "schema": { + "type": "object" + } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "(rpc) gen_random_uuid" + ] + } + } + }, + "externalDocs": { + "description": "PostgREST Documentation", + "url": "https://postgrest.org/en/v12.0/api.html" + }, + "servers": [ + { + "url": "http://localhost:3000" + } + ], + "components": { + "parameters": { + "preferParams": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "params=single-object" + ] + } + }, + "preferReturn": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none" + ] + } + }, + "preferCount": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "count=none" + ] + } + }, + "preferPost": { + "name": "Prefer", + "description": "Preference", + "required": false, + "in": "header", + "schema": { + "type": "string", + "enum": [ + "return=representation", + "return=minimal", + "return=none", + "resolution=ignore-duplicates", + "resolution=merge-duplicates" + ] + } + }, + "select": { + "name": "select", + "description": "Filtering Columns", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "on_conflict": { + "name": "on_conflict", + "description": "On Conflict", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "order": { + "name": "order", + "description": "Ordering", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "range": { + "name": "Range", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string" + } + }, + "rangeUnit": { + "name": "Range-Unit", + "description": "Limiting and Pagination", + "required": false, + "in": "header", + "schema": { + "type": "string", + "default": "items" + } + }, + "offset": { + "name": "offset", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "limit": { + "name": "limit", + "description": "Limiting and Pagination", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + "rowFilter.service_fallbacks.service_fallback_id": { + "name": "service_fallback_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_fallbacks.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.fallback_url": { + "name": "fallback_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_fallbacks.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_fallbacks.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_application_rbac.id": { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_application_rbac.portal_application_id": { + "name": "portal_application_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_application_rbac.portal_user_id": { + "name": "portal_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_application_rbac.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_application_rbac.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_plans.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.portal_plan_type_description": { + "name": "portal_plan_type_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_plans.plan_usage_limit": { + "name": "plan_usage_limit", + "description": "Maximum usage allowed within the interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_usage_limit_interval": { + "name": "plan_usage_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_plans.plan_rate_limit_rps": { + "name": "plan_rate_limit_rps", + "description": "Rate limit in requests per second", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_plans.plan_application_limit": { + "name": "plan_application_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_users.portal_user_id": { + "name": "portal_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_users.portal_user_email": { + "name": "portal_user_email", + "description": "Unique email address for the user", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_users.signed_up": { + "name": "signed_up", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.portal_users.portal_admin": { + "name": "portal_admin", + "description": "Whether user has admin privileges across the portal", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.portal_users.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_users.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_users.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.portal_application_id": { + "name": "portal_application_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_application_name": { + "name": "portal_application_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.emoji": { + "name": "emoji", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.portal_application_user_limit": { + "name": "portal_application_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_interval": { + "name": "portal_application_user_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_applications.portal_application_user_limit_rps": { + "name": "portal_application_user_limit_rps", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_applications.portal_application_description": { + "name": "portal_application_description", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.favorite_service_ids": { + "name": "favorite_service_ids", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.portal_applications.secret_key_hash": { + "name": "secret_key_hash", + "description": "Hashed secret key for application authentication", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_applications.secret_key_required": { + "name": "secret_key_required", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.portal_applications.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_applications.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.service_name": { + "name": "service_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.compute_units_per_relay": { + "name": "compute_units_per_relay", + "description": "Cost in compute units for each relay", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.services.service_domains": { + "name": "service_domains", + "description": "Valid domains for this service", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying[]" + } + }, + "rowFilter.services.service_owner_address": { + "name": "service_owner_address", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.active": { + "name": "active", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.beta": { + "name": "beta", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.coming_soon": { + "name": "coming_soon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.quality_fallback_enabled": { + "name": "quality_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.hard_fallback_enabled": { + "name": "hard_fallback_enabled", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.services.svg_icon": { + "name": "svg_icon", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" + } + }, + "rowFilter.services.public_endpoint_url": { + "name": "public_endpoint_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.status_endpoint_url": { + "name": "status_endpoint_url", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.services.status_query": { + "name": "status_query", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "text" + } + }, + "rowFilter.services.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.services.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.portal_account_id": { + "name": "portal_account_id", + "description": "Unique identifier for the portal account", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.organization_id": { + "name": "organization_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.user_account_name": { + "name": "user_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.internal_account_name": { + "name": "internal_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit": { + "name": "portal_account_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit_interval": { + "name": "portal_account_user_limit_interval", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.plan_interval" + } + }, + "rowFilter.portal_accounts.portal_account_user_limit_rps": { + "name": "portal_account_user_limit_rps", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_accounts.billing_type": { + "name": "billing_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.stripe_subscription_id": { + "name": "stripe_subscription_id", + "description": "Stripe subscription identifier for billing", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.gcp_account_id": { + "name": "gcp_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.gcp_entitlement_id": { + "name": "gcp_entitlement_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_accounts.deleted_at": { + "name": "deleted_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.portal_accounts.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.organization_id": { + "name": "organization_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.organizations.organization_name": { + "name": "organization_name", + "description": "Name of the organization", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.organizations.deleted_at": { + "name": "deleted_at", + "description": "Soft delete timestamp", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.organizations.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.networks.network_id": { + "name": "network_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.user_account_name": { + "name": "user_account_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.portal_plan_type": { + "name": "portal_plan_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.billing_type": { + "name": "billing_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.portal_account_user_limit": { + "name": "portal_account_user_limit", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" } + }, + "rowFilter.portal_workers_account_data.gcp_entitlement_id": { + "name": "gcp_entitlement_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.owner_email": { + "name": "owner_email", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_workers_account_data.owner_user_id": { + "name": "owner_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.id": { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.portal_account_rbac.portal_account_id": { + "name": "portal_account_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.portal_user_id": { + "name": "portal_user_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.role_name": { + "name": "role_name", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.portal_account_rbac.user_joined_account": { + "name": "user_joined_account", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "boolean" + } + }, + "rowFilter.service_endpoints.endpoint_id": { + "name": "endpoint_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "integer" + } + }, + "rowFilter.service_endpoints.service_id": { + "name": "service_id", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "character varying" + } + }, + "rowFilter.service_endpoints.endpoint_type": { + "name": "endpoint_type", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "public.endpoint_type" + } + }, + "rowFilter.service_endpoints.created_at": { + "name": "created_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + }, + "rowFilter.service_endpoints.updated_at": { + "name": "updated_at", + "required": false, + "in": "query", + "schema": { + "type": "string", + "format": "timestamp with time zone" + } + } + }, + "requestBodies": { + "portal_accounts": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_accounts" + } + } + }, + "description": "portal_accounts" + }, + "networks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/networks" + } + } + }, + "description": "networks" + }, + "portal_users": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_users" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_users" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_users" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_users" + } + } + }, + "description": "portal_users" + }, + "service_endpoints": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_endpoints" + } + } + }, + "description": "service_endpoints" + }, + "Args": { + "content": { + "application/json": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "properties": { + "": { + "format": "bytea", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + } + }, + "required": true + }, + "portal_applications": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_applications" + } + } + }, + "description": "portal_applications" + }, + "portal_account_rbac": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_account_rbac" + } + } + }, + "description": "portal_account_rbac" + }, + "service_fallbacks": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/service_fallbacks" + } + } + }, + "description": "service_fallbacks" + }, + "portal_application_rbac": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_application_rbac" + } + } + }, + "description": "portal_application_rbac" + }, + "portal_plans": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/portal_plans" + } + } + }, + "description": "portal_plans" + }, + "services": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/services" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/services" + } + } + }, + "description": "services" + }, + "organizations": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/organizations" + } + } + }, + "description": "organizations" + }, + "Args2": { + "content": { + "application/json": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json;nulls=stripped": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "application/vnd.pgrst.object+json": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "properties": { + "": { + "format": "text", + "type": "string" + } + }, + "required": [ + "" + ], + "type": "object" + } + } + }, + "required": true + } + }, + "schemas": { + "service_fallbacks": { + "description": "Fallback URLs for services when primary endpoints fail", + "required": [ + "service_fallback_id", + "service_id", + "fallback_url" + ], + "properties": { + "service_fallback_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "fallback_url": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_application_rbac": { + "description": "User access controls for specific applications", + "required": [ + "id", + "portal_application_id", + "portal_user_id" + ], + "properties": { + "id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "portal_application_id": { + "description": "Note:\nThis is a Foreign Key to `portal_applications.portal_application_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_user_id": { + "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_plans": { + "description": "Available subscription plans for Portal Accounts", + "required": [ + "portal_plan_type" + ], + "properties": { + "portal_plan_type": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_plan_type_description": { + "format": "character varying", + "maxLength": 420, + "type": "string" + }, + "plan_usage_limit": { + "description": "Maximum usage allowed within the interval", + "format": "integer", + "type": "integer" + }, + "plan_usage_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "plan_rate_limit_rps": { + "description": "Rate limit in requests per second", + "format": "integer", + "type": "integer" + }, + "plan_application_limit": { + "format": "integer", + "type": "integer" + } + }, + "type": "object" + }, + "portal_users": { + "description": "Users who can access the portal and belong to multiple accounts", + "required": [ + "portal_user_id", + "portal_user_email" + ], + "properties": { + "portal_user_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_user_email": { + "description": "Unique email address for the user", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "signed_up": { + "default": false, + "type": "boolean" + }, + "portal_admin": { + "default": false, + "description": "Whether user has admin privileges across the portal", + "type": "boolean" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_applications": { + "description": "Applications created within portal accounts with their own rate limits and settings", + "required": [ + "portal_application_id", + "portal_account_id" + ], + "properties": { + "portal_application_id": { + "default": "gen_random_uuid()", + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_account_id": { + "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_application_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "emoji": { + "format": "character varying", + "maxLength": 16, + "type": "string" + }, + "portal_application_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_application_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_application_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "portal_application_description": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "favorite_service_ids": { + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "secret_key_hash": { + "description": "Hashed secret key for application authentication", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "secret_key_required": { + "default": false, + "type": "boolean" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "services": { + "description": "Supported blockchain services from the Pocket Network", + "required": [ + "service_id", + "service_name", + "service_domains" + ], + "properties": { + "service_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "service_name": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "compute_units_per_relay": { + "description": "Cost in compute units for each relay", + "format": "integer", + "type": "integer" + }, + "service_domains": { + "description": "Valid domains for this service", + "format": "character varying[]", + "items": { + "type": "string" + }, + "type": "array" + }, + "service_owner_address": { + "format": "character varying", + "maxLength": 50, + "type": "string" + }, + "network_id": { + "description": "Note:\nThis is a Foreign Key to `networks.network_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "active": { + "default": false, + "type": "boolean" + }, + "beta": { + "default": false, + "type": "boolean" + }, + "coming_soon": { + "default": false, + "type": "boolean" + }, + "quality_fallback_enabled": { + "default": false, + "type": "boolean" + }, + "hard_fallback_enabled": { + "default": false, + "type": "boolean" + }, + "svg_icon": { + "format": "text", + "type": "string" + }, + "public_endpoint_url": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "status_endpoint_url": { + "format": "character varying", + "maxLength": 169, + "type": "string" + }, + "status_query": { + "format": "text", + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "portal_accounts": { + "description": "Multi-tenant accounts with plans and billing integration", + "required": [ + "portal_account_id", + "portal_plan_type" + ], + "properties": { + "portal_account_id": { + "default": "gen_random_uuid()", + "description": "Unique identifier for the portal account\n\nNote:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "organization_id": { + "description": "Note:\nThis is a Foreign Key to `organizations.organization_id`.", + "format": "integer", + "type": "integer" + }, + "portal_plan_type": { + "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "user_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "internal_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_account_user_limit": { + "format": "integer", + "type": "integer" + }, + "portal_account_user_limit_interval": { + "enum": [ + "day", + "month", + "year" + ], + "format": "public.plan_interval", + "type": "string" + }, + "portal_account_user_limit_rps": { + "format": "integer", + "type": "integer" + }, + "billing_type": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "stripe_subscription_id": { + "description": "Stripe subscription identifier for billing", + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_account_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "gcp_entitlement_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "deleted_at": { + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "organizations": { + "description": "Companies or customer groups that can be attached to Portal Accounts", + "required": [ + "organization_id", + "organization_name" + ], + "properties": { + "organization_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "organization_name": { + "description": "Name of the organization", + "format": "character varying", + "maxLength": 69, + "type": "string" + }, + "deleted_at": { + "description": "Soft delete timestamp", + "format": "timestamp with time zone", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + }, + "networks": { + "description": "Supported blockchain networks (Pocket mainnet, testnet, etc.)", + "required": [ + "network_id" + ], + "properties": { + "network_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 42, + "type": "string" + } + }, + "type": "object" + }, + "portal_workers_account_data": { + "description": "Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe'", + "properties": { + "portal_account_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "user_account_name": { + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "portal_plan_type": { + "description": "Note:\nThis is a Foreign Key to `portal_plans.portal_plan_type`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "billing_type": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "portal_account_user_limit": { + "format": "integer", + "type": "integer" + }, + "gcp_entitlement_id": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "owner_email": { + "format": "character varying", + "maxLength": 255, + "type": "string" + }, + "owner_user_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "character varying", + "maxLength": 36, + "type": "string" + } + }, + "type": "object" + }, + "portal_account_rbac": { + "description": "User roles and permissions for specific portal accounts", + "required": [ + "id", + "portal_account_id", + "portal_user_id", + "role_name" + ], + "properties": { + "id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "portal_account_id": { + "description": "Note:\nThis is a Foreign Key to `portal_accounts.portal_account_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "portal_user_id": { + "description": "Note:\nThis is a Foreign Key to `portal_users.portal_user_id`.", + "format": "character varying", + "maxLength": 36, + "type": "string" + }, + "role_name": { + "format": "character varying", + "maxLength": 20, + "type": "string" + }, + "user_joined_account": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + }, + "service_endpoints": { + "description": "Available endpoint types for each service", + "required": [ + "endpoint_id", + "service_id" + ], + "properties": { + "endpoint_id": { + "description": "Note:\nThis is a Primary Key.", + "format": "integer", + "type": "integer" + }, + "service_id": { + "description": "Note:\nThis is a Foreign Key to `services.service_id`.", + "format": "character varying", + "maxLength": 42, + "type": "string" + }, + "endpoint_type": { + "enum": [ + "cometBFT", + "cosmos", + "REST", + "JSON-RPC", + "WSS", + "gRPC" + ], + "format": "public.endpoint_type", + "type": "string" + }, + "created_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + }, + "updated_at": { + "default": "CURRENT_TIMESTAMP", + "format": "timestamp with time zone", + "type": "string" + } + }, + "type": "object" + } } -} \ No newline at end of file + } +} diff --git a/portal-db/schema/003_aux_services_queries.sql b/portal-db/schema/003_aux_services_queries.sql index 2df47ae0a..dbbd4b045 100644 --- a/portal-db/schema/003_aux_services_queries.sql +++ b/portal-db/schema/003_aux_services_queries.sql @@ -29,7 +29,7 @@ WHERE AND pu.deleted_at IS NULL AND par.role_name = 'LEGACY_OWNER'; --- Grant select permissions to both reader and admin roles -GRANT SELECT ON portal_workers_account_data TO portal_db_reader, portal_db_admin; +-- Grant select permissions to admin role only (admin has access to portal_users) +GRANT SELECT ON portal_workers_account_data TO portal_db_admin; COMMENT ON VIEW portal_workers_account_data IS 'Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = ''PLAN_UNLIMITED'' AND billing_type = ''stripe'''; diff --git a/portal-db/sdk/go/client.go b/portal-db/sdk/go/client.go index a28dafdc2..a11f55306 100644 --- a/portal-db/sdk/go/client.go +++ b/portal-db/sdk/go/client.go @@ -96,6 +96,201 @@ type ClientInterface interface { // Get request Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteNetworks request + DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNetworks request + GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchNetworksWithBody request with any body + PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostNetworksWithBody request with any body + PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOrganizations request + DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizations request + GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOrganizationsWithBody request with any body + PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationsWithBody request with any body + PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalAccountRbac request + DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalAccountRbac request + GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalAccountRbacWithBody request with any body + PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalAccountRbacWithBody request with any body + PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalAccounts request + DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalAccounts request + GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalAccountsWithBody request with any body + PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalAccountsWithBody request with any body + PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalApplicationRbac request + DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalApplicationRbac request + GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalApplicationRbacWithBody request with any body + PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalApplicationRbacWithBody request with any body + PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalApplications request + DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalApplications request + GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalApplicationsWithBody request with any body + PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalApplicationsWithBody request with any body + PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalPlans request + DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalPlans request + GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalPlansWithBody request with any body + PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalPlansWithBody request with any body + PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePortalUsers request + DeletePortalUsers(ctx context.Context, params *DeletePortalUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalUsers request + GetPortalUsers(ctx context.Context, params *GetPortalUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchPortalUsersWithBody request with any body + PatchPortalUsersWithBody(ctx context.Context, params *PatchPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalUsers(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPortalUsersWithBody request with any body + PostPortalUsersWithBody(ctx context.Context, params *PostPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalUsers(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPortalWorkersAccountData request + GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetRpcArmor request GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -167,6 +362,78 @@ type ClientInterface interface { PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceEndpoints request + DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceEndpoints request + GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceEndpointsWithBody request with any body + PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceEndpointsWithBody request with any body + PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServiceFallbacks request + DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServiceFallbacks request + GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServiceFallbacksWithBody request with any body + PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServiceFallbacksWithBody request with any body + PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteServices request + DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetServices request + GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchServicesWithBody request with any body + PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostServicesWithBody request with any body + PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -181,8 +448,8 @@ func (c *Client) Get(ctx context.Context, reqEditors ...RequestEditorFn) (*http. return c.Client.Do(req) } -func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcArmorRequest(c.Server, params) +func (c *Client) DeleteNetworks(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteNetworksRequest(c.Server, params) if err != nil { return nil, err } @@ -193,8 +460,8 @@ func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, req return c.Client.Do(req) } -func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithBody(c.Server, params, contentType, body) +func (c *Client) GetNetworks(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworksRequest(c.Server, params) if err != nil { return nil, err } @@ -205,8 +472,8 @@ func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorP return c.Client.Do(req) } -func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequest(c.Server, params, body) +func (c *Client) PatchNetworksWithBody(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -217,8 +484,8 @@ func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, b return c.Client.Do(req) } -func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchNetworks(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequest(c.Server, params, body) if err != nil { return nil, err } @@ -229,8 +496,8 @@ func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx conte return c.Client.Do(req) } -func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -241,8 +508,8 @@ func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedB return c.Client.Do(req) } -func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcDearmorRequest(c.Server, params) +func (c *Client) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -253,8 +520,8 @@ func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, return c.Client.Do(req) } -func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostNetworksWithBody(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -265,8 +532,8 @@ func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDear return c.Client.Do(req) } -func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequest(c.Server, params, body) +func (c *Client) PostNetworks(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequest(c.Server, params, body) if err != nil { return nil, err } @@ -277,8 +544,8 @@ func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParam return c.Client.Do(req) } -func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -289,8 +556,8 @@ func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx con return c.Client.Do(req) } -func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -301,8 +568,8 @@ func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippe return c.Client.Do(req) } -func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcGenRandomUuidRequest(c.Server) +func (c *Client) DeleteOrganizations(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrganizationsRequest(c.Server, params) if err != nil { return nil, err } @@ -313,8 +580,8 @@ func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestE return c.Client.Do(req) } -func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithBody(c.Server, params, contentType, body) +func (c *Client) GetOrganizations(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationsRequest(c.Server, params) if err != nil { return nil, err } @@ -325,8 +592,8 @@ func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostR return c.Client.Do(req) } -func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequest(c.Server, params, body) +func (c *Client) PatchOrganizationsWithBody(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -337,8 +604,8 @@ func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRan return c.Client.Do(req) } -func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchOrganizations(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -349,8 +616,8 @@ func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(c return c.Client.Do(req) } -func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -361,8 +628,8 @@ func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsS return c.Client.Do(req) } -func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcGenSaltRequest(c.Server, params) +func (c *Client) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -373,8 +640,8 @@ func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, return c.Client.Do(req) } -func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostOrganizationsWithBody(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -385,8 +652,8 @@ func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenS return c.Client.Do(req) } -func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequest(c.Server, params, body) +func (c *Client) PostOrganizations(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequest(c.Server, params, body) if err != nil { return nil, err } @@ -397,8 +664,8 @@ func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParam return c.Client.Do(req) } -func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -409,8 +676,8 @@ func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx con return c.Client.Do(req) } -func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -421,8 +688,8 @@ func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippe return c.Client.Do(req) } -func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcPgpArmorHeadersRequest(c.Server, params) +func (c *Client) DeletePortalAccountRbac(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -433,8 +700,8 @@ func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArm return c.Client.Do(req) } -func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithBody(c.Server, params, contentType, body) +func (c *Client) GetPortalAccountRbac(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountRbacRequest(c.Server, params) if err != nil { return nil, err } @@ -445,8 +712,8 @@ func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *Pos return c.Client.Do(req) } -func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequest(c.Server, params, body) +func (c *Client) PatchPortalAccountRbacWithBody(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -457,8 +724,8 @@ func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpA return c.Client.Do(req) } -func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PatchPortalAccountRbac(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -469,8 +736,8 @@ func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody return c.Client.Do(req) } -func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -481,8 +748,8 @@ func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNull return c.Client.Do(req) } -func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRpcPgpKeyIdRequest(c.Server, params) +func (c *Client) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -493,8 +760,8 @@ func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParam return c.Client.Do(req) } -func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PostPortalAccountRbacWithBody(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -505,8 +772,8 @@ func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgp return c.Client.Do(req) } -func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequest(c.Server, params, body) +func (c *Client) PostPortalAccountRbac(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequest(c.Server, params, body) if err != nil { return nil, err } @@ -517,8 +784,8 @@ func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdPar return c.Client.Do(req) } -func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) +func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } @@ -529,8 +796,8 @@ func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx co return c.Client.Do(req) } -func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) +func (c *Client) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } @@ -541,1409 +808,14279 @@ func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStripp return c.Client.Do(req) } -// NewGetRequest generates requests for Get -func NewGetRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) DeletePortalAccounts(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalAccountsRequest(c.Server, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) GetPortalAccounts(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalAccountsRequest(c.Server, params) if err != nil { return nil, err } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetRpcArmorRequest generates requests for GetRpcArmor -func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PatchPortalAccountsWithBody(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/armor") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PatchPortalAccounts(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequest(c.Server, params, body) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcArmorRequest calls the generic PostRpcArmor builder with application/json body -func NewPostRpcArmorRequest(server string, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json body -func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PostPortalAccountsWithBody(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) -} - -// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + return c.Client.Do(req) } -// NewPostRpcArmorRequestWithBody generates requests for PostRpcArmor with any type of body -func NewPostRpcArmorRequestWithBody(server string, params *PostRpcArmorParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalAccounts(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequest(c.Server, params, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/armor") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetRpcDearmorRequest generates requests for GetRpcDearmor -func NewGetRpcDearmorRequest(server string, params *GetRpcDearmorParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) DeletePortalApplicationRbac(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalApplicationRbacRequest(c.Server, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/dearmor") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) GetPortalApplicationRbac(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalApplicationRbacRequest(c.Server, params) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) PatchPortalApplicationRbacWithBody(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcDearmorRequest calls the generic PostRpcDearmor builder with application/json body -func NewPostRpcDearmorRequest(server string, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalApplicationRbac(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequest(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json body -func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcDearmorRequestWithBody generates requests for PostRpcDearmor with any type of body -func NewPostRpcDearmorRequestWithBody(server string, params *PostRpcDearmorParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalApplicationRbacWithBody(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/dearmor") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostPortalApplicationRbac(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequest(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetRpcGenRandomUuidRequest generates requests for GetRpcGenRandomUuid -func NewGetRpcGenRandomUuidRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/gen_random_uuid") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) DeletePortalApplications(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalApplicationsRequest(c.Server, params) if err != nil { return nil, err } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewPostRpcGenRandomUuidRequest calls the generic PostRpcGenRandomUuid builder with application/json body -func NewPostRpcGenRandomUuidRequest(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetPortalApplications(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalApplicationsRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json body -func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalApplicationsWithBody(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalApplications(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequest(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenRandomUuidRequestWithBody generates requests for PostRpcGenRandomUuid with any type of body -func NewPostRpcGenRandomUuidRequestWithBody(server string, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/gen_random_uuid") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PostPortalApplicationsWithBody(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetRpcGenSaltRequest generates requests for GetRpcGenSalt -func NewGetRpcGenSaltRequest(server string, params *GetRpcGenSaltParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalApplications(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequest(c.Server, params, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/gen_salt") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenSaltRequest calls the generic PostRpcGenSalt builder with application/json body -func NewPostRpcGenSaltRequest(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) DeletePortalPlans(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalPlansRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json body -func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetPortalPlans(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalPlansRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PatchPortalPlansWithBody(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcGenSaltRequestWithBody generates requests for PostRpcGenSalt with any type of body -func NewPostRpcGenSaltRequestWithBody(server string, params *PostRpcGenSaltParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PatchPortalPlans(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequest(c.Server, params, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/gen_salt") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetRpcPgpArmorHeadersRequest generates requests for GetRpcPgpArmorHeaders -func NewGetRpcPgpArmorHeadersRequest(server string, params *GetRpcPgpArmorHeadersParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalPlansWithBody(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostPortalPlans(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequest(c.Server, params, body) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpArmorHeadersRequest calls the generic PostRpcPgpArmorHeaders builder with application/json body -func NewPostRpcPgpArmorHeadersRequest(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json body -func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) DeletePortalUsers(ctx context.Context, params *DeletePortalUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePortalUsersRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetPortalUsers(ctx context.Context, params *GetPortalUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalUsersRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpArmorHeadersRequestWithBody generates requests for PostRpcPgpArmorHeaders with any type of body -func NewPostRpcPgpArmorHeadersRequestWithBody(server string, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PatchPortalUsersWithBody(ctx context.Context, params *PatchPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalUsersRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PatchPortalUsers(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalUsersRequest(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } - +func (c *Client) PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewGetRpcPgpKeyIdRequest generates requests for GetRpcPgpKeyId -func NewGetRpcPgpKeyIdRequest(server string, params *GetRpcPgpKeyIdParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostPortalUsersWithBody(ctx context.Context, params *PostPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalUsersRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/pgp_key_id") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostPortalUsers(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalUsersRequest(c.Server, params, body) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) PostPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpKeyIdRequest calls the generic PostRpcPgpKeyId builder with application/json body -func NewPostRpcPgpKeyIdRequest(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) PostPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json body -func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetPortalWorkersAccountData(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPortalWorkersAccountDataRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json;nulls=stripped body -func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetRpcArmor(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcArmorRequest(c.Server, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewPostRpcPgpKeyIdRequestWithBody generates requests for PostRpcPgpKeyId with any type of body -func NewPostRpcPgpKeyIdRequestWithBody(server string, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) PostRpcArmorWithBody(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/rpc/pgp_key_id") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) PostRpcArmor(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequest(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Prefer != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) - if err != nil { - return nil, err - } - - req.Header.Set("Prefer", headerParam0) - } +func (c *Client) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} +func (c *Client) GetRpcDearmor(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcDearmorRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - return req, nil +func (c *Client) PostRpcDearmorWithBody(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } +func (c *Client) PostRpcDearmor(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequest(c.Server, params, body) + if err != nil { + return nil, err } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } - return nil + return c.Client.Do(req) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) +func (c *Client) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil +func (c *Client) GetRpcGenRandomUuid(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenRandomUuidRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) } -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetWithResponse request - GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) +func (c *Client) PostRpcGenRandomUuidWithBody(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetRpcArmorWithResponse request - GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) +func (c *Client) PostRpcGenRandomUuid(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcGenSalt(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcGenSaltRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenSaltWithBody(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenSalt(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcPgpArmorHeaders(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpArmorHeadersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpArmorHeadersWithBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpArmorHeaders(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRpcPgpKeyId(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRpcPgpKeyIdRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpKeyIdWithBody(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpKeyId(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceEndpoints(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceEndpoints(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceEndpointsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithBody(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpoints(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithBody(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpoints(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServiceFallbacks(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServiceFallbacks(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServiceFallbacksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithBody(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacks(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithBody(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacks(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteServices(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetServices(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetServicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithBody(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServices(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithBody(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServices(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetRequest generates requests for Get +func NewGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteNetworksRequest generates requests for DeleteNetworks +func NewDeleteNetworksRequest(server string, params *DeleteNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetNetworksRequest generates requests for GetNetworks +func NewGetNetworksRequest(server string, params *GetNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchNetworksRequest calls the generic PatchNetworks builder with application/json body +func NewPatchNetworksRequest(server string, params *PatchNetworksParams, body PatchNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchNetworksRequestWithBody generates requests for PatchNetworks with any type of body +func NewPatchNetworksRequestWithBody(server string, params *PatchNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostNetworksRequest calls the generic PostNetworks builder with application/json body +func NewPostNetworksRequest(server string, params *PostNetworksParams, body PostNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostNetworks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostNetworksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostNetworksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostNetworksRequestWithBody generates requests for PostNetworks with any type of body +func NewPostNetworksRequestWithBody(server string, params *PostNetworksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteOrganizationsRequest generates requests for DeleteOrganizations +func NewDeleteOrganizationsRequest(server string, params *DeleteOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetOrganizationsRequest generates requests for GetOrganizations +func NewGetOrganizationsRequest(server string, params *GetOrganizationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchOrganizationsRequest calls the generic PatchOrganizations builder with application/json body +func NewPatchOrganizationsRequest(server string, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchOrganizationsRequestWithBody generates requests for PatchOrganizations with any type of body +func NewPatchOrganizationsRequestWithBody(server string, params *PatchOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_name", runtime.ParamLocationQuery, *params.OrganizationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body +func NewPostOrganizationsRequest(server string, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostOrganizations builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostOrganizationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostOrganizationsRequestWithBody generates requests for PostOrganizations with any type of body +func NewPostOrganizationsRequestWithBody(server string, params *PostOrganizationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalAccountRbacRequest generates requests for DeletePortalAccountRbac +func NewDeletePortalAccountRbacRequest(server string, params *DeletePortalAccountRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_account_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RoleName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserJoinedAccount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalAccountRbacRequest generates requests for GetPortalAccountRbac +func NewGetPortalAccountRbacRequest(server string, params *GetPortalAccountRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_account_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RoleName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserJoinedAccount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalAccountRbacRequest calls the generic PatchPortalAccountRbac builder with application/json body +func NewPatchPortalAccountRbacRequest(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalAccountRbacRequestWithBody generates requests for PatchPortalAccountRbac with any type of body +func NewPatchPortalAccountRbacRequestWithBody(server string, params *PatchPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_account_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RoleName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "role_name", runtime.ParamLocationQuery, *params.RoleName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserJoinedAccount != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_joined_account", runtime.ParamLocationQuery, *params.UserJoinedAccount); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalAccountRbacRequest calls the generic PostPortalAccountRbac builder with application/json body +func NewPostPortalAccountRbacRequest(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccountRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalAccountRbacRequestWithBody generates requests for PostPortalAccountRbac with any type of body +func NewPostPortalAccountRbacRequestWithBody(server string, params *PostPortalAccountRbacParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_account_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalAccountsRequest generates requests for DeletePortalAccounts +func NewDeletePortalAccountsRequest(server string, params *DeletePortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalAccountsRequest generates requests for GetPortalAccounts +func NewGetPortalAccountsRequest(server string, params *GetPortalAccountsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalAccountsRequest calls the generic PatchPortalAccounts builder with application/json body +func NewPatchPortalAccountsRequest(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalAccountsRequestWithBody generates requests for PatchPortalAccounts with any type of body +func NewPatchPortalAccountsRequestWithBody(server string, params *PatchPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InternalAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "internal_account_name", runtime.ParamLocationQuery, *params.InternalAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_interval", runtime.ParamLocationQuery, *params.PortalAccountUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit_rps", runtime.ParamLocationQuery, *params.PortalAccountUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StripeSubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stripe_subscription_id", runtime.ParamLocationQuery, *params.StripeSubscriptionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_account_id", runtime.ParamLocationQuery, *params.GcpAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalAccountsRequest calls the generic PostPortalAccounts builder with application/json body +func NewPostPortalAccountsRequest(server string, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalAccounts builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalAccountsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalAccountsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalAccountsRequestWithBody generates requests for PostPortalAccounts with any type of body +func NewPostPortalAccountsRequestWithBody(server string, params *PostPortalAccountsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_accounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalApplicationRbacRequest generates requests for DeletePortalApplicationRbac +func NewDeletePortalApplicationRbacRequest(server string, params *DeletePortalApplicationRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalApplicationRbacRequest generates requests for GetPortalApplicationRbac +func NewGetPortalApplicationRbacRequest(server string, params *GetPortalApplicationRbacParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalApplicationRbacRequest calls the generic PatchPortalApplicationRbac builder with application/json body +func NewPatchPortalApplicationRbacRequest(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json body +func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalApplicationRbacRequestWithBody generates requests for PatchPortalApplicationRbac with any type of body +func NewPatchPortalApplicationRbacRequestWithBody(server string, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalApplicationRbacRequest calls the generic PostPortalApplicationRbac builder with application/json body +func NewPostPortalApplicationRbacRequest(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json body +func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplicationRbac builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalApplicationRbacRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationRbacRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalApplicationRbacRequestWithBody generates requests for PostPortalApplicationRbac with any type of body +func NewPostPortalApplicationRbacRequestWithBody(server string, params *PostPortalApplicationRbacParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_application_rbac") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalApplicationsRequest generates requests for DeletePortalApplications +func NewDeletePortalApplicationsRequest(server string, params *DeletePortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalApplicationsRequest generates requests for GetPortalApplications +func NewGetPortalApplicationsRequest(server string, params *GetPortalApplicationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalApplicationsRequest calls the generic PatchPortalApplications builder with application/json body +func NewPatchPortalApplicationsRequest(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalApplicationsRequestWithBody generates requests for PatchPortalApplications with any type of body +func NewPatchPortalApplicationsRequestWithBody(server string, params *PatchPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalApplicationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_id", runtime.ParamLocationQuery, *params.PortalApplicationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_name", runtime.ParamLocationQuery, *params.PortalApplicationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Emoji != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "emoji", runtime.ParamLocationQuery, *params.Emoji); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit", runtime.ParamLocationQuery, *params.PortalApplicationUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_interval", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationUserLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_user_limit_rps", runtime.ParamLocationQuery, *params.PortalApplicationUserLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalApplicationDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_application_description", runtime.ParamLocationQuery, *params.PortalApplicationDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FavoriteServiceIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "favorite_service_ids", runtime.ParamLocationQuery, *params.FavoriteServiceIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyHash != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_hash", runtime.ParamLocationQuery, *params.SecretKeyHash); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretKeyRequired != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_key_required", runtime.ParamLocationQuery, *params.SecretKeyRequired); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalApplicationsRequest calls the generic PostPortalApplications builder with application/json body +func NewPostPortalApplicationsRequest(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalApplications builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalApplicationsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalApplicationsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalApplicationsRequestWithBody generates requests for PostPortalApplications with any type of body +func NewPostPortalApplicationsRequestWithBody(server string, params *PostPortalApplicationsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_applications") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalPlansRequest generates requests for DeletePortalPlans +func NewDeletePortalPlansRequest(server string, params *DeletePortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalPlansRequest generates requests for GetPortalPlans +func NewGetPortalPlansRequest(server string, params *GetPortalPlansParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalPlansRequest calls the generic PatchPortalPlans builder with application/json body +func NewPatchPortalPlansRequest(server string, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalPlansRequestWithBody generates requests for PatchPortalPlans with any type of body +func NewPatchPortalPlansRequestWithBody(server string, params *PatchPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanTypeDescription != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type_description", runtime.ParamLocationQuery, *params.PortalPlanTypeDescription); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit", runtime.ParamLocationQuery, *params.PlanUsageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanUsageLimitInterval != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_usage_limit_interval", runtime.ParamLocationQuery, *params.PlanUsageLimitInterval); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanRateLimitRps != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_rate_limit_rps", runtime.ParamLocationQuery, *params.PlanRateLimitRps); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PlanApplicationLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan_application_limit", runtime.ParamLocationQuery, *params.PlanApplicationLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalPlansRequest calls the generic PostPortalPlans builder with application/json body +func NewPostPortalPlansRequest(server string, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalPlans builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalPlansRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalPlansRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalPlansRequestWithBody generates requests for PostPortalPlans with any type of body +func NewPostPortalPlansRequestWithBody(server string, params *PostPortalPlansParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_plans") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeletePortalUsersRequest generates requests for DeletePortalUsers +func NewDeletePortalUsersRequest(server string, params *DeletePortalUsersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserEmail != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_email", runtime.ParamLocationQuery, *params.PortalUserEmail); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SignedUp != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "signed_up", runtime.ParamLocationQuery, *params.SignedUp); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAdmin != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_admin", runtime.ParamLocationQuery, *params.PortalAdmin); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalUsersRequest generates requests for GetPortalUsers +func NewGetPortalUsersRequest(server string, params *GetPortalUsersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserEmail != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_email", runtime.ParamLocationQuery, *params.PortalUserEmail); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SignedUp != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "signed_up", runtime.ParamLocationQuery, *params.SignedUp); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAdmin != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_admin", runtime.ParamLocationQuery, *params.PortalAdmin); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchPortalUsersRequest calls the generic PatchPortalUsers builder with application/json body +func NewPatchPortalUsersRequest(server string, params *PatchPortalUsersParams, body PatchPortalUsersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalUsersRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchPortalUsers builder with application/vnd.pgrst.object+json body +func NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalUsersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchPortalUsers builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchPortalUsersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchPortalUsersRequestWithBody generates requests for PatchPortalUsers with any type of body +func NewPatchPortalUsersRequestWithBody(server string, params *PatchPortalUsersParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_id", runtime.ParamLocationQuery, *params.PortalUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalUserEmail != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_user_email", runtime.ParamLocationQuery, *params.PortalUserEmail); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SignedUp != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "signed_up", runtime.ParamLocationQuery, *params.SignedUp); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAdmin != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_admin", runtime.ParamLocationQuery, *params.PortalAdmin); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostPortalUsersRequest calls the generic PostPortalUsers builder with application/json body +func NewPostPortalUsersRequest(server string, params *PostPortalUsersParams, body PostPortalUsersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalUsersRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostPortalUsers builder with application/vnd.pgrst.object+json body +func NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalUsersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostPortalUsers builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostPortalUsersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPortalUsersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostPortalUsersRequestWithBody generates requests for PostPortalUsers with any type of body +func NewPostPortalUsersRequestWithBody(server string, params *PostPortalUsersParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetPortalWorkersAccountDataRequest generates requests for GetPortalWorkersAccountData +func NewGetPortalWorkersAccountDataRequest(server string, params *GetPortalWorkersAccountDataParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/portal_workers_account_data") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PortalAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_id", runtime.ParamLocationQuery, *params.PortalAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAccountName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_account_name", runtime.ParamLocationQuery, *params.UserAccountName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalPlanType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_plan_type", runtime.ParamLocationQuery, *params.PortalPlanType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.BillingType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "billing_type", runtime.ParamLocationQuery, *params.BillingType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PortalAccountUserLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "portal_account_user_limit", runtime.ParamLocationQuery, *params.PortalAccountUserLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpEntitlementId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcp_entitlement_id", runtime.ParamLocationQuery, *params.GcpEntitlementId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OwnerEmail != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_email", runtime.ParamLocationQuery, *params.OwnerEmail); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OwnerUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "owner_user_id", runtime.ParamLocationQuery, *params.OwnerUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewGetRpcArmorRequest generates requests for GetRpcArmor +func NewGetRpcArmorRequest(server string, params *GetRpcArmorParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/armor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcArmorRequest calls the generic PostRpcArmor builder with application/json body +func NewPostRpcArmorRequest(server string, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcArmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcArmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcArmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcArmorRequestWithBody generates requests for PostRpcArmor with any type of body +func NewPostRpcArmorRequestWithBody(server string, params *PostRpcArmorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/armor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcDearmorRequest generates requests for GetRpcDearmor +func NewGetRpcDearmorRequest(server string, params *GetRpcDearmorParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcDearmorRequest calls the generic PostRpcDearmor builder with application/json body +func NewPostRpcDearmorRequest(server string, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcDearmor builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcDearmorRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcDearmorRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcDearmorRequestWithBody generates requests for PostRpcDearmor with any type of body +func NewPostRpcDearmorRequestWithBody(server string, params *PostRpcDearmorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/dearmor") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcGenRandomUuidRequest generates requests for GetRpcGenRandomUuid +func NewGetRpcGenRandomUuidRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcGenRandomUuidRequest calls the generic PostRpcGenRandomUuid builder with application/json body +func NewPostRpcGenRandomUuidRequest(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenRandomUuid builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenRandomUuidRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenRandomUuidRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcGenRandomUuidRequestWithBody generates requests for PostRpcGenRandomUuid with any type of body +func NewPostRpcGenRandomUuidRequestWithBody(server string, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/gen_random_uuid") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcGenSaltRequest generates requests for GetRpcGenSalt +func NewGetRpcGenSaltRequest(server string, params *GetRpcGenSaltParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/gen_salt") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcGenSaltRequest calls the generic PostRpcGenSalt builder with application/json body +func NewPostRpcGenSaltRequest(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcGenSalt builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcGenSaltRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcGenSaltRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcGenSaltRequestWithBody generates requests for PostRpcGenSalt with any type of body +func NewPostRpcGenSaltRequestWithBody(server string, params *PostRpcGenSaltParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/gen_salt") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcPgpArmorHeadersRequest generates requests for GetRpcPgpArmorHeaders +func NewGetRpcPgpArmorHeadersRequest(server string, params *GetRpcPgpArmorHeadersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcPgpArmorHeadersRequest calls the generic PostRpcPgpArmorHeaders builder with application/json body +func NewPostRpcPgpArmorHeadersRequest(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpArmorHeaders builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpArmorHeadersRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpArmorHeadersRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcPgpArmorHeadersRequestWithBody generates requests for PostRpcPgpArmorHeaders with any type of body +func NewPostRpcPgpArmorHeadersRequestWithBody(server string, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/pgp_armor_headers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetRpcPgpKeyIdRequest generates requests for GetRpcPgpKeyId +func NewGetRpcPgpKeyIdRequest(server string, params *GetRpcPgpKeyIdParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/pgp_key_id") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "", runtime.ParamLocationQuery, params.Empty); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostRpcPgpKeyIdRequest calls the generic PostRpcPgpKeyId builder with application/json body +func NewPostRpcPgpKeyIdRequest(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostRpcPgpKeyId builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostRpcPgpKeyIdRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostRpcPgpKeyIdRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostRpcPgpKeyIdRequestWithBody generates requests for PostRpcPgpKeyId with any type of body +func NewPostRpcPgpKeyIdRequestWithBody(server string, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rpc/pgp_key_id") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceEndpointsRequest generates requests for DeleteServiceEndpoints +func NewDeleteServiceEndpointsRequest(server string, params *DeleteServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceEndpointsRequest generates requests for GetServiceEndpoints +func NewGetServiceEndpointsRequest(server string, params *GetServiceEndpointsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceEndpointsRequest calls the generic PatchServiceEndpoints builder with application/json body +func NewPatchServiceEndpointsRequest(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceEndpointsRequestWithBody generates requests for PatchServiceEndpoints with any type of body +func NewPatchServiceEndpointsRequestWithBody(server string, params *PatchServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_id", runtime.ParamLocationQuery, *params.EndpointId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndpointType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint_type", runtime.ParamLocationQuery, *params.EndpointType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceEndpointsRequest calls the generic PostServiceEndpoints builder with application/json body +func NewPostServiceEndpointsRequest(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceEndpoints builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceEndpointsRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceEndpointsRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceEndpointsRequestWithBody generates requests for PostServiceEndpoints with any type of body +func NewPostServiceEndpointsRequestWithBody(server string, params *PostServiceEndpointsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_endpoints") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServiceFallbacksRequest generates requests for DeleteServiceFallbacks +func NewDeleteServiceFallbacksRequest(server string, params *DeleteServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServiceFallbacksRequest generates requests for GetServiceFallbacks +func NewGetServiceFallbacksRequest(server string, params *GetServiceFallbacksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServiceFallbacksRequest calls the generic PatchServiceFallbacks builder with application/json body +func NewPatchServiceFallbacksRequest(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServiceFallbacksRequestWithBody generates requests for PatchServiceFallbacks with any type of body +func NewPatchServiceFallbacksRequestWithBody(server string, params *PatchServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceFallbackId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_fallback_id", runtime.ParamLocationQuery, *params.ServiceFallbackId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FallbackUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fallback_url", runtime.ParamLocationQuery, *params.FallbackUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServiceFallbacksRequest calls the generic PostServiceFallbacks builder with application/json body +func NewPostServiceFallbacksRequest(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServiceFallbacks builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServiceFallbacksRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServiceFallbacksRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServiceFallbacksRequestWithBody generates requests for PostServiceFallbacks with any type of body +func NewPostServiceFallbacksRequestWithBody(server string, params *PostServiceFallbacksParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/service_fallbacks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewDeleteServicesRequest generates requests for DeleteServices +func NewDeleteServicesRequest(server string, params *DeleteServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewGetServicesRequest generates requests for GetServices +func NewGetServicesRequest(server string, params *GetServicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Order != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order", runtime.ParamLocationQuery, *params.Order); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Range != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Range", runtime.ParamLocationHeader, *params.Range) + if err != nil { + return nil, err + } + + req.Header.Set("Range", headerParam0) + } + + if params.RangeUnit != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Range-Unit", runtime.ParamLocationHeader, *params.RangeUnit) + if err != nil { + return nil, err + } + + req.Header.Set("Range-Unit", headerParam1) + } + + if params.Prefer != nil { + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam2) + } + + } + + return req, nil +} + +// NewPatchServicesRequest calls the generic PatchServices builder with application/json body +func NewPatchServicesRequest(server string, params *PatchServicesParams, body PatchServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PatchServices builder with application/vnd.pgrst.object+json body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PatchServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPatchServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPatchServicesRequestWithBody generates requests for PatchServices with any type of body +func NewPatchServicesRequestWithBody(server string, params *PatchServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ServiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_id", runtime.ParamLocationQuery, *params.ServiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_name", runtime.ParamLocationQuery, *params.ServiceName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComputeUnitsPerRelay != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_units_per_relay", runtime.ParamLocationQuery, *params.ComputeUnitsPerRelay); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceDomains != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_domains", runtime.ParamLocationQuery, *params.ServiceDomains); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ServiceOwnerAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_owner_address", runtime.ParamLocationQuery, *params.ServiceOwnerAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network_id", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Active != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "active", runtime.ParamLocationQuery, *params.Active); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Beta != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "beta", runtime.ParamLocationQuery, *params.Beta); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ComingSoon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "coming_soon", runtime.ParamLocationQuery, *params.ComingSoon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.QualityFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "quality_fallback_enabled", runtime.ParamLocationQuery, *params.QualityFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HardFallbackEnabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hard_fallback_enabled", runtime.ParamLocationQuery, *params.HardFallbackEnabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SvgIcon != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "svg_icon", runtime.ParamLocationQuery, *params.SvgIcon); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PublicEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "public_endpoint_url", runtime.ParamLocationQuery, *params.PublicEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusEndpointUrl != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_endpoint_url", runtime.ParamLocationQuery, *params.StatusEndpointUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusQuery != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_query", runtime.ParamLocationQuery, *params.StatusQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at", runtime.ParamLocationQuery, *params.DeletedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +// NewPostServicesRequest calls the generic PostServices builder with application/json body +func NewPostServicesRequest(server string, params *PostServicesParams, body PostServicesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody calls the generic PostServices builder with application/vnd.pgrst.object+json body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json", bodyReader) +} + +// NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody calls the generic PostServices builder with application/vnd.pgrst.object+json;nulls=stripped body +func NewPostServicesRequestWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(server string, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostServicesRequestWithBody(server, params, "application/vnd.pgrst.object+json;nulls=stripped", bodyReader) +} + +// NewPostServicesRequestWithBody generates requests for PostServices with any type of body +func NewPostServicesRequestWithBody(server string, params *PostServicesParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/services") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Select != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "select", runtime.ParamLocationQuery, *params.Select); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Prefer != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Prefer", runtime.ParamLocationHeader, *params.Prefer) + if err != nil { + return nil, err + } + + req.Header.Set("Prefer", headerParam0) + } + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetWithResponse request + GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) + + // DeleteNetworksWithResponse request + DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) + + // GetNetworksWithResponse request + GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) + + // PatchNetworksWithBodyWithResponse request with any body + PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) + + // PostNetworksWithBodyWithResponse request with any body + PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) + + // DeleteOrganizationsWithResponse request + DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) + + // GetOrganizationsWithResponse request + GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) + + // PatchOrganizationsWithBodyWithResponse request with any body + PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) + + // PostOrganizationsWithBodyWithResponse request with any body + PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) + + // DeletePortalAccountRbacWithResponse request + DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) + + // GetPortalAccountRbacWithResponse request + GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) + + // PatchPortalAccountRbacWithBodyWithResponse request with any body + PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) + + // PostPortalAccountRbacWithBodyWithResponse request with any body + PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) + + // DeletePortalAccountsWithResponse request + DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) + + // GetPortalAccountsWithResponse request + GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) + + // PatchPortalAccountsWithBodyWithResponse request with any body + PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) + + // PostPortalAccountsWithBodyWithResponse request with any body + PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) + + // DeletePortalApplicationRbacWithResponse request + DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) + + // GetPortalApplicationRbacWithResponse request + GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) + + // PatchPortalApplicationRbacWithBodyWithResponse request with any body + PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) + + // PostPortalApplicationRbacWithBodyWithResponse request with any body + PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) + + // DeletePortalApplicationsWithResponse request + DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) + + // GetPortalApplicationsWithResponse request + GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) + + // PatchPortalApplicationsWithBodyWithResponse request with any body + PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) + + // PostPortalApplicationsWithBodyWithResponse request with any body + PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) + + // DeletePortalPlansWithResponse request + DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) + + // GetPortalPlansWithResponse request + GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) + + // PatchPortalPlansWithBodyWithResponse request with any body + PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) + + // PostPortalPlansWithBodyWithResponse request with any body + PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) + + // DeletePortalUsersWithResponse request + DeletePortalUsersWithResponse(ctx context.Context, params *DeletePortalUsersParams, reqEditors ...RequestEditorFn) (*DeletePortalUsersResponse, error) + + // GetPortalUsersWithResponse request + GetPortalUsersWithResponse(ctx context.Context, params *GetPortalUsersParams, reqEditors ...RequestEditorFn) (*GetPortalUsersResponse, error) + + // PatchPortalUsersWithBodyWithResponse request with any body + PatchPortalUsersWithBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) + + PatchPortalUsersWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) + + PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) + + PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) + + // PostPortalUsersWithBodyWithResponse request with any body + PostPortalUsersWithBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) + + PostPortalUsersWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) + + PostPortalUsersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) + + PostPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) + + // GetPortalWorkersAccountDataWithResponse request + GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) + + // GetRpcArmorWithResponse request + GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) + + // PostRpcArmorWithBodyWithResponse request with any body + PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) + + // GetRpcDearmorWithResponse request + GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) + + // PostRpcDearmorWithBodyWithResponse request with any body + PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) + + // GetRpcGenRandomUuidWithResponse request + GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) + + // PostRpcGenRandomUuidWithBodyWithResponse request with any body + PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) + + // GetRpcGenSaltWithResponse request + GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) + + // PostRpcGenSaltWithBodyWithResponse request with any body + PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + + PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + + PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + + // GetRpcPgpArmorHeadersWithResponse request + GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) + + // PostRpcPgpArmorHeadersWithBodyWithResponse request with any body + PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + + // GetRpcPgpKeyIdWithResponse request + GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) + + // PostRpcPgpKeyIdWithBodyWithResponse request with any body + PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + + // DeleteServiceEndpointsWithResponse request + DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) + + // GetServiceEndpointsWithResponse request + GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) + + // PatchServiceEndpointsWithBodyWithResponse request with any body + PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) + + // PostServiceEndpointsWithBodyWithResponse request with any body + PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) + + // DeleteServiceFallbacksWithResponse request + DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) + + // GetServiceFallbacksWithResponse request + GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) + + // PatchServiceFallbacksWithBodyWithResponse request with any body + PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) + + // PostServiceFallbacksWithBodyWithResponse request with any body + PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) + + // DeleteServicesWithResponse request + DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) + + // GetServicesWithResponse request + GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) + + // PatchServicesWithBodyWithResponse request with any body + PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) + + // PostServicesWithBodyWithResponse request with any body + PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) + + PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) +} + +type GetResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Networks + ApplicationvndPgrstObjectJSON200 *[]Networks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Networks +} + +// Status returns HTTPResponse.Status +func (r GetNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostNetworksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Organizations + ApplicationvndPgrstObjectJSON200 *[]Organizations + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Organizations +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalAccountRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalAccountRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalAccountRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalAccountRbacResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalAccountRbac + ApplicationvndPgrstObjectJSON200 *[]PortalAccountRbac + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccountRbac +} + +// Status returns HTTPResponse.Status +func (r GetPortalAccountRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalAccountRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalAccountRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalAccountRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalAccountRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalAccountRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSON200 *[]PortalAccounts + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalAccounts +} + +// Status returns HTTPResponse.Status +func (r GetPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalAccountsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalApplicationRbac + ApplicationvndPgrstObjectJSON200 *[]PortalApplicationRbac + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplicationRbac +} + +// Status returns HTTPResponse.Status +func (r GetPortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalApplicationRbacResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalApplicationRbacResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalApplicationRbacResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSON200 *[]PortalApplications + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalApplications +} + +// Status returns HTTPResponse.Status +func (r GetPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalApplicationsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalApplicationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalApplicationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSON200 *[]PortalPlans + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalPlans +} + +// Status returns HTTPResponse.Status +func (r GetPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalPlansResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalPlansResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalPlansResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePortalUsersResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeletePortalUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePortalUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalUsers + ApplicationvndPgrstObjectJSON200 *[]PortalUsers + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalUsers +} + +// Status returns HTTPResponse.Status +func (r GetPortalUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchPortalUsersResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchPortalUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchPortalUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPortalUsersResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostPortalUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPortalUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPortalWorkersAccountDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PortalWorkersAccountData + ApplicationvndPgrstObjectJSON200 *[]PortalWorkersAccountData + ApplicationvndPgrstObjectJSONNullsStripped200 *[]PortalWorkersAccountData +} + +// Status returns HTTPResponse.Status +func (r GetPortalWorkersAccountDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPortalWorkersAccountDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcArmorResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcArmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcArmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcArmorResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcArmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcArmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcDearmorResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcDearmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcDearmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcDearmorResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcDearmorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcDearmorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcGenRandomUuidResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcGenRandomUuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcGenRandomUuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcGenRandomUuidResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcGenRandomUuidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcGenRandomUuidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcGenSaltResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcGenSaltResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcGenSaltResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcGenSaltResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcGenSaltResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcGenSaltResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcPgpArmorHeadersResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcPgpArmorHeadersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcPgpArmorHeadersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcPgpArmorHeadersResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcPgpArmorHeadersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcPgpArmorHeadersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRpcPgpKeyIdResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetRpcPgpKeyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRpcPgpKeyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostRpcPgpKeyIdResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostRpcPgpKeyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostRpcPgpKeyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSON200 *[]ServiceEndpoints + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceEndpoints +} + +// Status returns HTTPResponse.Status +func (r GetServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceEndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceEndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSON200 *[]ServiceFallbacks + ApplicationvndPgrstObjectJSONNullsStripped200 *[]ServiceFallbacks +} + +// Status returns HTTPResponse.Status +func (r GetServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServiceFallbacksResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServiceFallbacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServiceFallbacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetServicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Services + ApplicationvndPgrstObjectJSON200 *[]Services + ApplicationvndPgrstObjectJSONNullsStripped200 *[]Services +} + +// Status returns HTTPResponse.Status +func (r GetServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PatchServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostServicesResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetWithResponse request returning *GetResponse +func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { + rsp, err := c.Get(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetResponse(rsp) +} + +// DeleteNetworksWithResponse request returning *DeleteNetworksResponse +func (c *ClientWithResponses) DeleteNetworksWithResponse(ctx context.Context, params *DeleteNetworksParams, reqEditors ...RequestEditorFn) (*DeleteNetworksResponse, error) { + rsp, err := c.DeleteNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteNetworksResponse(rsp) +} + +// GetNetworksWithResponse request returning *GetNetworksResponse +func (c *ClientWithResponses) GetNetworksWithResponse(ctx context.Context, params *GetNetworksParams, reqEditors ...RequestEditorFn) (*GetNetworksResponse, error) { + rsp, err := c.GetNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworksResponse(rsp) +} + +// PatchNetworksWithBodyWithResponse request with arbitrary body returning *PatchNetworksResponse +func (c *ClientWithResponses) PatchNetworksWithBodyWithResponse(ctx context.Context, params *PatchNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchNetworksParams, body PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworksResponse, error) { + rsp, err := c.PatchNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchNetworksResponse(rsp) +} + +// PostNetworksWithBodyWithResponse request with arbitrary body returning *PostNetworksResponse +func (c *ClientWithResponses) PostNetworksWithBodyWithResponse(ctx context.Context, params *PostNetworksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +func (c *ClientWithResponses) PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostNetworksParams, body PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostNetworksResponse, error) { + rsp, err := c.PostNetworksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostNetworksResponse(rsp) +} + +// DeleteOrganizationsWithResponse request returning *DeleteOrganizationsResponse +func (c *ClientWithResponses) DeleteOrganizationsWithResponse(ctx context.Context, params *DeleteOrganizationsParams, reqEditors ...RequestEditorFn) (*DeleteOrganizationsResponse, error) { + rsp, err := c.DeleteOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrganizationsResponse(rsp) +} + +// GetOrganizationsWithResponse request returning *GetOrganizationsResponse +func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, params *GetOrganizationsParams, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { + rsp, err := c.GetOrganizations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationsResponse(rsp) +} + +// PatchOrganizationsWithBodyWithResponse request with arbitrary body returning *PatchOrganizationsResponse +func (c *ClientWithResponses) PatchOrganizationsWithBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchOrganizationsParams, body PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchOrganizationsResponse, error) { + rsp, err := c.PatchOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOrganizationsResponse(rsp) +} + +// PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse +func (c *ClientWithResponses) PostOrganizationsWithBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizations(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostOrganizationsParams, body PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error) { + rsp, err := c.PostOrganizationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationsResponse(rsp) +} + +// DeletePortalAccountRbacWithResponse request returning *DeletePortalAccountRbacResponse +func (c *ClientWithResponses) DeletePortalAccountRbacWithResponse(ctx context.Context, params *DeletePortalAccountRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountRbacResponse, error) { + rsp, err := c.DeletePortalAccountRbac(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalAccountRbacResponse(rsp) +} + +// GetPortalAccountRbacWithResponse request returning *GetPortalAccountRbacResponse +func (c *ClientWithResponses) GetPortalAccountRbacWithResponse(ctx context.Context, params *GetPortalAccountRbacParams, reqEditors ...RequestEditorFn) (*GetPortalAccountRbacResponse, error) { + rsp, err := c.GetPortalAccountRbac(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalAccountRbacResponse(rsp) +} + +// PatchPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountRbacResponse +func (c *ClientWithResponses) PatchPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountRbacWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbac(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountRbacParams, body PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountRbacResponse, error) { + rsp, err := c.PatchPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountRbacResponse(rsp) +} + +// PostPortalAccountRbacWithBodyWithResponse request with arbitrary body returning *PostPortalAccountRbacResponse +func (c *ClientWithResponses) PostPortalAccountRbacWithBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountRbacWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbac(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountRbacParams, body PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountRbacResponse, error) { + rsp, err := c.PostPortalAccountRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountRbacResponse(rsp) +} + +// DeletePortalAccountsWithResponse request returning *DeletePortalAccountsResponse +func (c *ClientWithResponses) DeletePortalAccountsWithResponse(ctx context.Context, params *DeletePortalAccountsParams, reqEditors ...RequestEditorFn) (*DeletePortalAccountsResponse, error) { + rsp, err := c.DeletePortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalAccountsResponse(rsp) +} + +// GetPortalAccountsWithResponse request returning *GetPortalAccountsResponse +func (c *ClientWithResponses) GetPortalAccountsWithResponse(ctx context.Context, params *GetPortalAccountsParams, reqEditors ...RequestEditorFn) (*GetPortalAccountsResponse, error) { + rsp, err := c.GetPortalAccounts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalAccountsResponse(rsp) +} + +// PatchPortalAccountsWithBodyWithResponse request with arbitrary body returning *PatchPortalAccountsResponse +func (c *ClientWithResponses) PatchPortalAccountsWithBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalAccountsParams, body PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalAccountsResponse, error) { + rsp, err := c.PatchPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalAccountsResponse(rsp) +} + +// PostPortalAccountsWithBodyWithResponse request with arbitrary body returning *PostPortalAccountsResponse +func (c *ClientWithResponses) PostPortalAccountsWithBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccounts(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalAccountsParams, body PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalAccountsResponse, error) { + rsp, err := c.PostPortalAccountsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalAccountsResponse(rsp) +} + +// DeletePortalApplicationRbacWithResponse request returning *DeletePortalApplicationRbacResponse +func (c *ClientWithResponses) DeletePortalApplicationRbacWithResponse(ctx context.Context, params *DeletePortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationRbacResponse, error) { + rsp, err := c.DeletePortalApplicationRbac(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalApplicationRbacResponse(rsp) +} + +// GetPortalApplicationRbacWithResponse request returning *GetPortalApplicationRbacResponse +func (c *ClientWithResponses) GetPortalApplicationRbacWithResponse(ctx context.Context, params *GetPortalApplicationRbacParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationRbacResponse, error) { + rsp, err := c.GetPortalApplicationRbac(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalApplicationRbacResponse(rsp) +} + +// PatchPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationRbacResponse +func (c *ClientWithResponses) PatchPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationRbacWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbac(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationRbacParams, body PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationRbacResponse, error) { + rsp, err := c.PatchPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationRbacResponse(rsp) +} + +// PostPortalApplicationRbacWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationRbacResponse +func (c *ClientWithResponses) PostPortalApplicationRbacWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationRbacWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbac(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationRbacResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationRbacParams, body PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationRbacResponse, error) { + rsp, err := c.PostPortalApplicationRbacWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationRbacResponse(rsp) +} + +// DeletePortalApplicationsWithResponse request returning *DeletePortalApplicationsResponse +func (c *ClientWithResponses) DeletePortalApplicationsWithResponse(ctx context.Context, params *DeletePortalApplicationsParams, reqEditors ...RequestEditorFn) (*DeletePortalApplicationsResponse, error) { + rsp, err := c.DeletePortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalApplicationsResponse(rsp) +} + +// GetPortalApplicationsWithResponse request returning *GetPortalApplicationsResponse +func (c *ClientWithResponses) GetPortalApplicationsWithResponse(ctx context.Context, params *GetPortalApplicationsParams, reqEditors ...RequestEditorFn) (*GetPortalApplicationsResponse, error) { + rsp, err := c.GetPortalApplications(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalApplicationsResponse(rsp) +} + +// PatchPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PatchPortalApplicationsResponse +func (c *ClientWithResponses) PatchPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalApplicationsParams, body PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalApplicationsResponse, error) { + rsp, err := c.PatchPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalApplicationsResponse(rsp) +} + +// PostPortalApplicationsWithBodyWithResponse request with arbitrary body returning *PostPortalApplicationsResponse +func (c *ClientWithResponses) PostPortalApplicationsWithBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplications(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalApplicationsParams, body PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalApplicationsResponse, error) { + rsp, err := c.PostPortalApplicationsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalApplicationsResponse(rsp) +} + +// DeletePortalPlansWithResponse request returning *DeletePortalPlansResponse +func (c *ClientWithResponses) DeletePortalPlansWithResponse(ctx context.Context, params *DeletePortalPlansParams, reqEditors ...RequestEditorFn) (*DeletePortalPlansResponse, error) { + rsp, err := c.DeletePortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalPlansResponse(rsp) +} + +// GetPortalPlansWithResponse request returning *GetPortalPlansResponse +func (c *ClientWithResponses) GetPortalPlansWithResponse(ctx context.Context, params *GetPortalPlansParams, reqEditors ...RequestEditorFn) (*GetPortalPlansResponse, error) { + rsp, err := c.GetPortalPlans(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalPlansResponse(rsp) +} + +// PatchPortalPlansWithBodyWithResponse request with arbitrary body returning *PatchPortalPlansResponse +func (c *ClientWithResponses) PatchPortalPlansWithBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalPlansParams, body PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalPlansResponse, error) { + rsp, err := c.PatchPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalPlansResponse(rsp) +} + +// PostPortalPlansWithBodyWithResponse request with arbitrary body returning *PostPortalPlansResponse +func (c *ClientWithResponses) PostPortalPlansWithBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlans(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalPlansParams, body PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalPlansResponse, error) { + rsp, err := c.PostPortalPlansWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalPlansResponse(rsp) +} + +// DeletePortalUsersWithResponse request returning *DeletePortalUsersResponse +func (c *ClientWithResponses) DeletePortalUsersWithResponse(ctx context.Context, params *DeletePortalUsersParams, reqEditors ...RequestEditorFn) (*DeletePortalUsersResponse, error) { + rsp, err := c.DeletePortalUsers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePortalUsersResponse(rsp) +} + +// GetPortalUsersWithResponse request returning *GetPortalUsersResponse +func (c *ClientWithResponses) GetPortalUsersWithResponse(ctx context.Context, params *GetPortalUsersParams, reqEditors ...RequestEditorFn) (*GetPortalUsersResponse, error) { + rsp, err := c.GetPortalUsers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalUsersResponse(rsp) +} + +// PatchPortalUsersWithBodyWithResponse request with arbitrary body returning *PatchPortalUsersResponse +func (c *ClientWithResponses) PatchPortalUsersWithBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) { + rsp, err := c.PatchPortalUsersWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalUsersWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) { + rsp, err := c.PatchPortalUsers(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) { + rsp, err := c.PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchPortalUsersParams, body PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchPortalUsersResponse, error) { + rsp, err := c.PatchPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchPortalUsersResponse(rsp) +} + +// PostPortalUsersWithBodyWithResponse request with arbitrary body returning *PostPortalUsersResponse +func (c *ClientWithResponses) PostPortalUsersWithBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) { + rsp, err := c.PostPortalUsersWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalUsersWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) { + rsp, err := c.PostPortalUsers(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalUsersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) { + rsp, err := c.PostPortalUsersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalUsersResponse(rsp) +} + +func (c *ClientWithResponses) PostPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostPortalUsersParams, body PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostPortalUsersResponse, error) { + rsp, err := c.PostPortalUsersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPortalUsersResponse(rsp) +} + +// GetPortalWorkersAccountDataWithResponse request returning *GetPortalWorkersAccountDataResponse +func (c *ClientWithResponses) GetPortalWorkersAccountDataWithResponse(ctx context.Context, params *GetPortalWorkersAccountDataParams, reqEditors ...RequestEditorFn) (*GetPortalWorkersAccountDataResponse, error) { + rsp, err := c.GetPortalWorkersAccountData(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPortalWorkersAccountDataResponse(rsp) +} + +// GetRpcArmorWithResponse request returning *GetRpcArmorResponse +func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { + rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcArmorResponse(rsp) +} + +// PostRpcArmorWithBodyWithResponse request with arbitrary body returning *PostRpcArmorResponse +func (c *ClientWithResponses) PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcArmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmor(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcArmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcArmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { + rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcArmorResponse(rsp) +} + +// GetRpcDearmorWithResponse request returning *GetRpcDearmorResponse +func (c *ClientWithResponses) GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) { + rsp, err := c.GetRpcDearmor(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcDearmorResponse(rsp) +} + +// PostRpcDearmorWithBodyWithResponse request with arbitrary body returning *PostRpcDearmorResponse +func (c *ClientWithResponses) PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcDearmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmor(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcDearmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcDearmorResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { + rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcDearmorResponse(rsp) +} + +// GetRpcGenRandomUuidWithResponse request returning *GetRpcGenRandomUuidResponse +func (c *ClientWithResponses) GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) { + rsp, err := c.GetRpcGenRandomUuid(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcGenRandomUuidResponse(rsp) +} + +// PostRpcGenRandomUuidWithBodyWithResponse request with arbitrary body returning *PostRpcGenRandomUuidResponse +func (c *ClientWithResponses) PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenRandomUuidResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuid(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenRandomUuidResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenRandomUuidResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { + rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenRandomUuidResponse(rsp) +} + +// GetRpcGenSaltWithResponse request returning *GetRpcGenSaltResponse +func (c *ClientWithResponses) GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) { + rsp, err := c.GetRpcGenSalt(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcGenSaltResponse(rsp) +} + +// PostRpcGenSaltWithBodyWithResponse request with arbitrary body returning *PostRpcGenSaltResponse +func (c *ClientWithResponses) PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenSaltResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSalt(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenSaltResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenSaltResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { + rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcGenSaltResponse(rsp) +} + +// GetRpcPgpArmorHeadersWithResponse request returning *GetRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) { + rsp, err := c.GetRpcPgpArmorHeaders(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcPgpArmorHeadersResponse(rsp) +} + +// PostRpcPgpArmorHeadersWithBodyWithResponse request with arbitrary body returning *PostRpcPgpArmorHeadersResponse +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeaders(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { + rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpArmorHeadersResponse(rsp) +} + +// GetRpcPgpKeyIdWithResponse request returning *GetRpcPgpKeyIdResponse +func (c *ClientWithResponses) GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) { + rsp, err := c.GetRpcPgpKeyId(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRpcPgpKeyIdResponse(rsp) +} + +// PostRpcPgpKeyIdWithBodyWithResponse request with arbitrary body returning *PostRpcPgpKeyIdResponse +func (c *ClientWithResponses) PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpKeyIdResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyId(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpKeyIdResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpKeyIdResponse(rsp) +} + +func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { + rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostRpcPgpKeyIdResponse(rsp) +} + +// DeleteServiceEndpointsWithResponse request returning *DeleteServiceEndpointsResponse +func (c *ClientWithResponses) DeleteServiceEndpointsWithResponse(ctx context.Context, params *DeleteServiceEndpointsParams, reqEditors ...RequestEditorFn) (*DeleteServiceEndpointsResponse, error) { + rsp, err := c.DeleteServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceEndpointsResponse(rsp) +} + +// GetServiceEndpointsWithResponse request returning *GetServiceEndpointsResponse +func (c *ClientWithResponses) GetServiceEndpointsWithResponse(ctx context.Context, params *GetServiceEndpointsParams, reqEditors ...RequestEditorFn) (*GetServiceEndpointsResponse, error) { + rsp, err := c.GetServiceEndpoints(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceEndpointsResponse(rsp) +} + +// PatchServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PatchServiceEndpointsResponse +func (c *ClientWithResponses) PatchServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceEndpointsParams, body PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceEndpointsResponse, error) { + rsp, err := c.PatchServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceEndpointsResponse(rsp) +} + +// PostServiceEndpointsWithBodyWithResponse request with arbitrary body returning *PostServiceEndpointsResponse +func (c *ClientWithResponses) PostServiceEndpointsWithBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpoints(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +func (c *ClientWithResponses) PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceEndpointsParams, body PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceEndpointsResponse, error) { + rsp, err := c.PostServiceEndpointsWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceEndpointsResponse(rsp) +} + +// DeleteServiceFallbacksWithResponse request returning *DeleteServiceFallbacksResponse +func (c *ClientWithResponses) DeleteServiceFallbacksWithResponse(ctx context.Context, params *DeleteServiceFallbacksParams, reqEditors ...RequestEditorFn) (*DeleteServiceFallbacksResponse, error) { + rsp, err := c.DeleteServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServiceFallbacksResponse(rsp) +} + +// GetServiceFallbacksWithResponse request returning *GetServiceFallbacksResponse +func (c *ClientWithResponses) GetServiceFallbacksWithResponse(ctx context.Context, params *GetServiceFallbacksParams, reqEditors ...RequestEditorFn) (*GetServiceFallbacksResponse, error) { + rsp, err := c.GetServiceFallbacks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServiceFallbacksResponse(rsp) +} + +// PatchServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PatchServiceFallbacksResponse +func (c *ClientWithResponses) PatchServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} + +func (c *ClientWithResponses) PatchServiceFallbacksWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} - // PostRpcArmorWithBodyWithResponse request with any body - PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} - PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) +func (c *ClientWithResponses) PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServiceFallbacksParams, body PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServiceFallbacksResponse, error) { + rsp, err := c.PatchServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServiceFallbacksResponse(rsp) +} - PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) +// PostServiceFallbacksWithBodyWithResponse request with arbitrary body returning *PostServiceFallbacksResponse +func (c *ClientWithResponses) PostServiceFallbacksWithBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} - PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) +func (c *ClientWithResponses) PostServiceFallbacksWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacks(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} - // GetRpcDearmorWithResponse request - GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} - // PostRpcDearmorWithBodyWithResponse request with any body - PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) +func (c *ClientWithResponses) PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServiceFallbacksParams, body PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServiceFallbacksResponse, error) { + rsp, err := c.PostServiceFallbacksWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServiceFallbacksResponse(rsp) +} - PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) +// DeleteServicesWithResponse request returning *DeleteServicesResponse +func (c *ClientWithResponses) DeleteServicesWithResponse(ctx context.Context, params *DeleteServicesParams, reqEditors ...RequestEditorFn) (*DeleteServicesResponse, error) { + rsp, err := c.DeleteServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteServicesResponse(rsp) +} - PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) +// GetServicesWithResponse request returning *GetServicesResponse +func (c *ClientWithResponses) GetServicesWithResponse(ctx context.Context, params *GetServicesParams, reqEditors ...RequestEditorFn) (*GetServicesResponse, error) { + rsp, err := c.GetServices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetServicesResponse(rsp) +} - PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) +// PatchServicesWithBodyWithResponse request with arbitrary body returning *PatchServicesResponse +func (c *ClientWithResponses) PatchServicesWithBodyWithResponse(ctx context.Context, params *PatchServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} - // GetRpcGenRandomUuidWithResponse request - GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) +func (c *ClientWithResponses) PatchServicesWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} - // PostRpcGenRandomUuidWithBodyWithResponse request with any body - PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} - PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) +func (c *ClientWithResponses) PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PatchServicesParams, body PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PatchServicesResponse, error) { + rsp, err := c.PatchServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchServicesResponse(rsp) +} - PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) +// PostServicesWithBodyWithResponse request with arbitrary body returning *PostServicesResponse +func (c *ClientWithResponses) PostServicesWithBodyWithResponse(ctx context.Context, params *PostServicesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} - PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) +func (c *ClientWithResponses) PostServicesWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServices(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} - // GetRpcGenSaltWithResponse request - GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} - // PostRpcGenSaltWithBodyWithResponse request with any body - PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) +func (c *ClientWithResponses) PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostServicesParams, body PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostServicesResponse, error) { + rsp, err := c.PostServicesWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostServicesResponse(rsp) +} - PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) +// ParseGetResponse parses an HTTP response from a GetWithResponse call +func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } - PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + response := &GetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } - PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) + return response, nil +} - // GetRpcPgpArmorHeadersWithResponse request - GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) +// ParseDeleteNetworksResponse parses an HTTP response from a DeleteNetworksWithResponse call +func ParseDeleteNetworksResponse(rsp *http.Response) (*DeleteNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } - // PostRpcPgpArmorHeadersWithBodyWithResponse request with any body - PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + response := &DeleteNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } - PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + return response, nil +} - PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) +// ParseGetNetworksResponse parses an HTTP response from a GetNetworksWithResponse call +func ParseGetNetworksResponse(rsp *http.Response) (*GetNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } - PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) + response := &GetNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Networks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchNetworksResponse parses an HTTP response from a PatchNetworksWithResponse call +func ParsePatchNetworksResponse(rsp *http.Response) (*PatchNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostNetworksResponse parses an HTTP response from a PostNetworksWithResponse call +func ParsePostNetworksResponse(rsp *http.Response) (*PostNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteOrganizationsResponse parses an HTTP response from a DeleteOrganizationsWithResponse call +func ParseDeleteOrganizationsResponse(rsp *http.Response) (*DeleteOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call +func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil +} + +// ParsePatchOrganizationsResponse parses an HTTP response from a PatchOrganizationsWithResponse call +func ParsePatchOrganizationsResponse(rsp *http.Response) (*PatchOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call +func ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeletePortalAccountRbacResponse parses an HTTP response from a DeletePortalAccountRbacWithResponse call +func ParseDeletePortalAccountRbacResponse(rsp *http.Response) (*DeletePortalAccountRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePortalAccountRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseGetPortalAccountRbacResponse parses an HTTP response from a GetPortalAccountRbacWithResponse call +func ParseGetPortalAccountRbacResponse(rsp *http.Response) (*GetPortalAccountRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPortalAccountRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } - // GetRpcPgpKeyIdWithResponse request - GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalAccountRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest - // PostRpcPgpKeyIdWithBodyWithResponse request with any body - PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalAccountRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest - PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalAccountRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest - PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported - PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) -} + } -type GetResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePatchPortalAccountRbacResponse parses an HTTP response from a PatchPortalAccountRbacWithResponse call +func ParsePatchPortalAccountRbacResponse(rsp *http.Response) (*PatchPortalAccountRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PatchPortalAccountRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type GetRpcArmorResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetRpcArmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePostPortalAccountRbacResponse parses an HTTP response from a PostPortalAccountRbacWithResponse call +func ParsePostPortalAccountRbacResponse(rsp *http.Response) (*PostPortalAccountRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcArmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PostPortalAccountRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type PostRpcArmorResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r PostRpcArmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParseDeletePortalAccountsResponse parses an HTTP response from a DeletePortalAccountsWithResponse call +func ParseDeletePortalAccountsResponse(rsp *http.Response) (*DeletePortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcArmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &DeletePortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type GetRpcDearmorResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetRpcDearmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParseGetPortalAccountsResponse parses an HTTP response from a GetPortalAccountsWithResponse call +func ParseGetPortalAccountsResponse(rsp *http.Response) (*GetPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcDearmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &GetPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type PostRpcDearmorResponse struct { - Body []byte - HTTPResponse *http.Response -} + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// Status returns HTTPResponse.Status -func (r PostRpcDearmorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalAccounts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcDearmorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode } - return 0 -} -type GetRpcGenRandomUuidResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetRpcGenRandomUuidResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePatchPortalAccountsResponse parses an HTTP response from a PatchPortalAccountsWithResponse call +func ParsePatchPortalAccountsResponse(rsp *http.Response) (*PatchPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcGenRandomUuidResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PatchPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type PostRpcGenRandomUuidResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r PostRpcGenRandomUuidResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePostPortalAccountsResponse parses an HTTP response from a PostPortalAccountsWithResponse call +func ParsePostPortalAccountsResponse(rsp *http.Response) (*PostPortalAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcGenRandomUuidResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PostPortalAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type GetRpcGenSaltResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetRpcGenSaltResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParseDeletePortalApplicationRbacResponse parses an HTTP response from a DeletePortalApplicationRbacWithResponse call +func ParseDeletePortalApplicationRbacResponse(rsp *http.Response) (*DeletePortalApplicationRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcGenSaltResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &DeletePortalApplicationRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type PostRpcGenSaltResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r PostRpcGenSaltResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParseGetPortalApplicationRbacResponse parses an HTTP response from a GetPortalApplicationRbacWithResponse call +func ParseGetPortalApplicationRbacResponse(rsp *http.Response) (*GetPortalApplicationRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcGenSaltResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &GetPortalApplicationRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type GetRpcPgpArmorHeadersResponse struct { - Body []byte - HTTPResponse *http.Response -} + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalApplicationRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// Status returns HTTPResponse.Status -func (r GetRpcPgpArmorHeadersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalApplicationRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalApplicationRbac + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcPgpArmorHeadersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode } - return 0 -} -type PostRpcPgpArmorHeadersResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r PostRpcPgpArmorHeadersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePatchPortalApplicationRbacResponse parses an HTTP response from a PatchPortalApplicationRbacWithResponse call +func ParsePatchPortalApplicationRbacResponse(rsp *http.Response) (*PatchPortalApplicationRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcPgpArmorHeadersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PatchPortalApplicationRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type GetRpcPgpKeyIdResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r GetRpcPgpKeyIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParsePostPortalApplicationRbacResponse parses an HTTP response from a PostPortalApplicationRbacWithResponse call +func ParsePostPortalApplicationRbacResponse(rsp *http.Response) (*PostPortalApplicationRbacResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetRpcPgpKeyIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &PostPortalApplicationRbacResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 -} -type PostRpcPgpKeyIdResponse struct { - Body []byte - HTTPResponse *http.Response + return response, nil } -// Status returns HTTPResponse.Status -func (r PostRpcPgpKeyIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ParseDeletePortalApplicationsResponse parses an HTTP response from a DeletePortalApplicationsWithResponse call +func ParseDeletePortalApplicationsResponse(rsp *http.Response) (*DeletePortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r PostRpcPgpKeyIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + response := &DeletePortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return 0 + + return response, nil } -// GetWithResponse request returning *GetResponse -func (c *ClientWithResponses) GetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetResponse, error) { - rsp, err := c.Get(ctx, reqEditors...) +// ParseGetPortalApplicationsResponse parses an HTTP response from a GetPortalApplicationsWithResponse call +func ParseGetPortalApplicationsResponse(rsp *http.Response) (*GetPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetResponse(rsp) + + response := &GetPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalApplications + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil } -// GetRpcArmorWithResponse request returning *GetRpcArmorResponse -func (c *ClientWithResponses) GetRpcArmorWithResponse(ctx context.Context, params *GetRpcArmorParams, reqEditors ...RequestEditorFn) (*GetRpcArmorResponse, error) { - rsp, err := c.GetRpcArmor(ctx, params, reqEditors...) +// ParsePatchPortalApplicationsResponse parses an HTTP response from a PatchPortalApplicationsWithResponse call +func ParsePatchPortalApplicationsResponse(rsp *http.Response) (*PatchPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetRpcArmorResponse(rsp) + + response := &PatchPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// PostRpcArmorWithBodyWithResponse request with arbitrary body returning *PostRpcArmorResponse -func (c *ClientWithResponses) PostRpcArmorWithBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithBody(ctx, params, contentType, body, reqEditors...) +// ParsePostPortalApplicationsResponse parses an HTTP response from a PostPortalApplicationsWithResponse call +func ParsePostPortalApplicationsResponse(rsp *http.Response) (*PostPortalApplicationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcArmorResponse(rsp) + + response := &PostPortalApplicationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcArmorWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmor(ctx, params, body, reqEditors...) +// ParseDeletePortalPlansResponse parses an HTTP response from a DeletePortalPlansWithResponse call +func ParseDeletePortalPlansResponse(rsp *http.Response) (*DeletePortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcArmorResponse(rsp) + + response := &DeletePortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +// ParseGetPortalPlansResponse parses an HTTP response from a GetPortalPlansWithResponse call +func ParseGetPortalPlansResponse(rsp *http.Response) (*GetPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcArmorResponse(rsp) + + response := &GetPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalPlans + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil } -func (c *ClientWithResponses) PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcArmorParams, body PostRpcArmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcArmorResponse, error) { - rsp, err := c.PostRpcArmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// ParsePatchPortalPlansResponse parses an HTTP response from a PatchPortalPlansWithResponse call +func ParsePatchPortalPlansResponse(rsp *http.Response) (*PatchPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcArmorResponse(rsp) + + response := &PatchPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// GetRpcDearmorWithResponse request returning *GetRpcDearmorResponse -func (c *ClientWithResponses) GetRpcDearmorWithResponse(ctx context.Context, params *GetRpcDearmorParams, reqEditors ...RequestEditorFn) (*GetRpcDearmorResponse, error) { - rsp, err := c.GetRpcDearmor(ctx, params, reqEditors...) +// ParsePostPortalPlansResponse parses an HTTP response from a PostPortalPlansWithResponse call +func ParsePostPortalPlansResponse(rsp *http.Response) (*PostPortalPlansResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetRpcDearmorResponse(rsp) + + response := &PostPortalPlansResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// PostRpcDearmorWithBodyWithResponse request with arbitrary body returning *PostRpcDearmorResponse -func (c *ClientWithResponses) PostRpcDearmorWithBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithBody(ctx, params, contentType, body, reqEditors...) +// ParseDeletePortalUsersResponse parses an HTTP response from a DeletePortalUsersWithResponse call +func ParseDeletePortalUsersResponse(rsp *http.Response) (*DeletePortalUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcDearmorResponse(rsp) + + response := &DeletePortalUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcDearmorWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmor(ctx, params, body, reqEditors...) +// ParseGetPortalUsersResponse parses an HTTP response from a GetPortalUsersWithResponse call +func ParseGetPortalUsersResponse(rsp *http.Response) (*GetPortalUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcDearmorResponse(rsp) + + response := &GetPortalUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalUsers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalUsers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalUsers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil } -func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +// ParsePatchPortalUsersResponse parses an HTTP response from a PatchPortalUsersWithResponse call +func ParsePatchPortalUsersResponse(rsp *http.Response) (*PatchPortalUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcDearmorResponse(rsp) + + response := &PatchPortalUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcDearmorParams, body PostRpcDearmorApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcDearmorResponse, error) { - rsp, err := c.PostRpcDearmorWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// ParsePostPortalUsersResponse parses an HTTP response from a PostPortalUsersWithResponse call +func ParsePostPortalUsersResponse(rsp *http.Response) (*PostPortalUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcDearmorResponse(rsp) + + response := &PostPortalUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// GetRpcGenRandomUuidWithResponse request returning *GetRpcGenRandomUuidResponse -func (c *ClientWithResponses) GetRpcGenRandomUuidWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRpcGenRandomUuidResponse, error) { - rsp, err := c.GetRpcGenRandomUuid(ctx, reqEditors...) +// ParseGetPortalWorkersAccountDataResponse parses an HTTP response from a GetPortalWorkersAccountDataWithResponse call +func ParseGetPortalWorkersAccountDataResponse(rsp *http.Response) (*GetPortalWorkersAccountDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetRpcGenRandomUuidResponse(rsp) + + response := &GetPortalWorkersAccountDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []PortalWorkersAccountData + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + + return response, nil } -// PostRpcGenRandomUuidWithBodyWithResponse request with arbitrary body returning *PostRpcGenRandomUuidResponse -func (c *ClientWithResponses) PostRpcGenRandomUuidWithBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithBody(ctx, params, contentType, body, reqEditors...) +// ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call +func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcGenRandomUuidResponse(rsp) + + response := &GetRpcArmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcGenRandomUuidWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuid(ctx, params, body, reqEditors...) +// ParsePostRpcArmorResponse parses an HTTP response from a PostRpcArmorWithResponse call +func ParsePostRpcArmorResponse(rsp *http.Response) (*PostRpcArmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcGenRandomUuidResponse(rsp) -} -func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err + response := &PostRpcArmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcGenRandomUuidResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenRandomUuidParams, body PostRpcGenRandomUuidApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenRandomUuidResponse, error) { - rsp, err := c.PostRpcGenRandomUuidWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// ParseGetRpcDearmorResponse parses an HTTP response from a GetRpcDearmorWithResponse call +func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcGenRandomUuidResponse(rsp) -} -// GetRpcGenSaltWithResponse request returning *GetRpcGenSaltResponse -func (c *ClientWithResponses) GetRpcGenSaltWithResponse(ctx context.Context, params *GetRpcGenSaltParams, reqEditors ...RequestEditorFn) (*GetRpcGenSaltResponse, error) { - rsp, err := c.GetRpcGenSalt(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &GetRpcDearmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetRpcGenSaltResponse(rsp) + + return response, nil } -// PostRpcGenSaltWithBodyWithResponse request with arbitrary body returning *PostRpcGenSaltResponse -func (c *ClientWithResponses) PostRpcGenSaltWithBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithBody(ctx, params, contentType, body, reqEditors...) +// ParsePostRpcDearmorResponse parses an HTTP response from a PostRpcDearmorWithResponse call +func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcGenSaltResponse(rsp) -} -func (c *ClientWithResponses) PostRpcGenSaltWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSalt(ctx, params, body, reqEditors...) - if err != nil { - return nil, err + response := &PostRpcDearmorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcGenSaltResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +// ParseGetRpcGenRandomUuidResponse parses an HTTP response from a GetRpcGenRandomUuidWithResponse call +func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcGenSaltResponse(rsp) -} -func (c *ClientWithResponses) PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcGenSaltParams, body PostRpcGenSaltApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcGenSaltResponse, error) { - rsp, err := c.PostRpcGenSaltWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err + response := &GetRpcGenRandomUuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcGenSaltResponse(rsp) + + return response, nil } -// GetRpcPgpArmorHeadersWithResponse request returning *GetRpcPgpArmorHeadersResponse -func (c *ClientWithResponses) GetRpcPgpArmorHeadersWithResponse(ctx context.Context, params *GetRpcPgpArmorHeadersParams, reqEditors ...RequestEditorFn) (*GetRpcPgpArmorHeadersResponse, error) { - rsp, err := c.GetRpcPgpArmorHeaders(ctx, params, reqEditors...) +// ParsePostRpcGenRandomUuidResponse parses an HTTP response from a PostRpcGenRandomUuidWithResponse call +func ParsePostRpcGenRandomUuidResponse(rsp *http.Response) (*PostRpcGenRandomUuidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetRpcPgpArmorHeadersResponse(rsp) -} -// PostRpcPgpArmorHeadersWithBodyWithResponse request with arbitrary body returning *PostRpcPgpArmorHeadersResponse -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &PostRpcGenRandomUuidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcPgpArmorHeadersResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeaders(ctx, params, body, reqEditors...) +// ParseGetRpcGenSaltResponse parses an HTTP response from a GetRpcGenSaltWithResponse call +func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) - if err != nil { - return nil, err + response := &GetRpcGenSaltResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcPgpArmorHeadersResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpArmorHeadersParams, body PostRpcPgpArmorHeadersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpArmorHeadersResponse, error) { - rsp, err := c.PostRpcPgpArmorHeadersWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// ParsePostRpcGenSaltResponse parses an HTTP response from a PostRpcGenSaltWithResponse call +func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcPgpArmorHeadersResponse(rsp) -} -// GetRpcPgpKeyIdWithResponse request returning *GetRpcPgpKeyIdResponse -func (c *ClientWithResponses) GetRpcPgpKeyIdWithResponse(ctx context.Context, params *GetRpcPgpKeyIdParams, reqEditors ...RequestEditorFn) (*GetRpcPgpKeyIdResponse, error) { - rsp, err := c.GetRpcPgpKeyId(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &PostRpcGenSaltResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetRpcPgpKeyIdResponse(rsp) + + return response, nil } -// PostRpcPgpKeyIdWithBodyWithResponse request with arbitrary body returning *PostRpcPgpKeyIdResponse -func (c *ClientWithResponses) PostRpcPgpKeyIdWithBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithBody(ctx, params, contentType, body, reqEditors...) +// ParseGetRpcPgpArmorHeadersResponse parses an HTTP response from a GetRpcPgpArmorHeadersWithResponse call +func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHeadersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcPgpKeyIdResponse(rsp) -} -func (c *ClientWithResponses) PostRpcPgpKeyIdWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyId(ctx, params, body, reqEditors...) - if err != nil { - return nil, err + response := &GetRpcPgpArmorHeadersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParsePostRpcPgpKeyIdResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONBody(ctx, params, body, reqEditors...) +// ParsePostRpcPgpArmorHeadersResponse parses an HTTP response from a PostRpcPgpArmorHeadersWithResponse call +func ParsePostRpcPgpArmorHeadersResponse(rsp *http.Response) (*PostRpcPgpArmorHeadersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcPgpKeyIdResponse(rsp) + + response := &PostRpcPgpArmorHeadersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBodyWithResponse(ctx context.Context, params *PostRpcPgpKeyIdParams, body PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody, reqEditors ...RequestEditorFn) (*PostRpcPgpKeyIdResponse, error) { - rsp, err := c.PostRpcPgpKeyIdWithApplicationVndPgrstObjectPlusJSONNullsStrippedBody(ctx, params, body, reqEditors...) +// ParseGetRpcPgpKeyIdResponse parses an HTTP response from a GetRpcPgpKeyIdWithResponse call +func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParsePostRpcPgpKeyIdResponse(rsp) + + response := &GetRpcPgpKeyIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// ParseGetResponse parses an HTTP response from a GetWithResponse call -func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { +// ParsePostRpcPgpKeyIdResponse parses an HTTP response from a PostRpcPgpKeyIdWithResponse call +func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetResponse{ + response := &PostRpcPgpKeyIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -1951,15 +15088,15 @@ func ParseGetResponse(rsp *http.Response) (*GetResponse, error) { return response, nil } -// ParseGetRpcArmorResponse parses an HTTP response from a GetRpcArmorWithResponse call -func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) { +// ParseDeleteServiceEndpointsResponse parses an HTTP response from a DeleteServiceEndpointsWithResponse call +func ParseDeleteServiceEndpointsResponse(rsp *http.Response) (*DeleteServiceEndpointsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcArmorResponse{ + response := &DeleteServiceEndpointsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -1967,31 +15104,58 @@ func ParseGetRpcArmorResponse(rsp *http.Response) (*GetRpcArmorResponse, error) return response, nil } -// ParsePostRpcArmorResponse parses an HTTP response from a PostRpcArmorWithResponse call -func ParsePostRpcArmorResponse(rsp *http.Response) (*PostRpcArmorResponse, error) { +// ParseGetServiceEndpointsResponse parses an HTTP response from a GetServiceEndpointsWithResponse call +func ParseGetServiceEndpointsResponse(rsp *http.Response) (*GetServiceEndpointsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcArmorResponse{ + response := &GetServiceEndpointsResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceEndpoints + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + return response, nil } -// ParseGetRpcDearmorResponse parses an HTTP response from a GetRpcDearmorWithResponse call -func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, error) { +// ParsePatchServiceEndpointsResponse parses an HTTP response from a PatchServiceEndpointsWithResponse call +func ParsePatchServiceEndpointsResponse(rsp *http.Response) (*PatchServiceEndpointsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcDearmorResponse{ + response := &PatchServiceEndpointsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -1999,15 +15163,15 @@ func ParseGetRpcDearmorResponse(rsp *http.Response) (*GetRpcDearmorResponse, err return response, nil } -// ParsePostRpcDearmorResponse parses an HTTP response from a PostRpcDearmorWithResponse call -func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, error) { +// ParsePostServiceEndpointsResponse parses an HTTP response from a PostServiceEndpointsWithResponse call +func ParsePostServiceEndpointsResponse(rsp *http.Response) (*PostServiceEndpointsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcDearmorResponse{ + response := &PostServiceEndpointsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2015,15 +15179,15 @@ func ParsePostRpcDearmorResponse(rsp *http.Response) (*PostRpcDearmorResponse, e return response, nil } -// ParseGetRpcGenRandomUuidResponse parses an HTTP response from a GetRpcGenRandomUuidWithResponse call -func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidResponse, error) { +// ParseDeleteServiceFallbacksResponse parses an HTTP response from a DeleteServiceFallbacksWithResponse call +func ParseDeleteServiceFallbacksResponse(rsp *http.Response) (*DeleteServiceFallbacksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcGenRandomUuidResponse{ + response := &DeleteServiceFallbacksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2031,31 +15195,58 @@ func ParseGetRpcGenRandomUuidResponse(rsp *http.Response) (*GetRpcGenRandomUuidR return response, nil } -// ParsePostRpcGenRandomUuidResponse parses an HTTP response from a PostRpcGenRandomUuidWithResponse call -func ParsePostRpcGenRandomUuidResponse(rsp *http.Response) (*PostRpcGenRandomUuidResponse, error) { +// ParseGetServiceFallbacksResponse parses an HTTP response from a GetServiceFallbacksWithResponse call +func ParseGetServiceFallbacksResponse(rsp *http.Response) (*GetServiceFallbacksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcGenRandomUuidResponse{ + response := &GetServiceFallbacksResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []ServiceFallbacks + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + return response, nil } -// ParseGetRpcGenSaltResponse parses an HTTP response from a GetRpcGenSaltWithResponse call -func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, error) { +// ParsePatchServiceFallbacksResponse parses an HTTP response from a PatchServiceFallbacksWithResponse call +func ParsePatchServiceFallbacksResponse(rsp *http.Response) (*PatchServiceFallbacksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcGenSaltResponse{ + response := &PatchServiceFallbacksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2063,15 +15254,15 @@ func ParseGetRpcGenSaltResponse(rsp *http.Response) (*GetRpcGenSaltResponse, err return response, nil } -// ParsePostRpcGenSaltResponse parses an HTTP response from a PostRpcGenSaltWithResponse call -func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, error) { +// ParsePostServiceFallbacksResponse parses an HTTP response from a PostServiceFallbacksWithResponse call +func ParsePostServiceFallbacksResponse(rsp *http.Response) (*PostServiceFallbacksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcGenSaltResponse{ + response := &PostServiceFallbacksResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2079,15 +15270,15 @@ func ParsePostRpcGenSaltResponse(rsp *http.Response) (*PostRpcGenSaltResponse, e return response, nil } -// ParseGetRpcPgpArmorHeadersResponse parses an HTTP response from a GetRpcPgpArmorHeadersWithResponse call -func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHeadersResponse, error) { +// ParseDeleteServicesResponse parses an HTTP response from a DeleteServicesWithResponse call +func ParseDeleteServicesResponse(rsp *http.Response) (*DeleteServicesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcPgpArmorHeadersResponse{ + response := &DeleteServicesResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2095,31 +15286,58 @@ func ParseGetRpcPgpArmorHeadersResponse(rsp *http.Response) (*GetRpcPgpArmorHead return response, nil } -// ParsePostRpcPgpArmorHeadersResponse parses an HTTP response from a PostRpcPgpArmorHeadersWithResponse call -func ParsePostRpcPgpArmorHeadersResponse(rsp *http.Response) (*PostRpcPgpArmorHeadersResponse, error) { +// ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call +func ParseGetServicesResponse(rsp *http.Response) (*GetServicesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcPgpArmorHeadersResponse{ + response := &GetServicesResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case rsp.Header.Get("Content-Type") == "application/json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSON200 = &dest + + case rsp.Header.Get("Content-Type") == "application/vnd.pgrst.object+json;nulls=stripped" && rsp.StatusCode == 200: + var dest []Services + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndPgrstObjectJSONNullsStripped200 = &dest + + case rsp.StatusCode == 200: + // Content-type (text/csv) unsupported + + } + return response, nil } -// ParseGetRpcPgpKeyIdResponse parses an HTTP response from a GetRpcPgpKeyIdWithResponse call -func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, error) { +// ParsePatchServicesResponse parses an HTTP response from a PatchServicesWithResponse call +func ParsePatchServicesResponse(rsp *http.Response) (*PatchServicesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetRpcPgpKeyIdResponse{ + response := &PatchServicesResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2127,15 +15345,15 @@ func ParseGetRpcPgpKeyIdResponse(rsp *http.Response) (*GetRpcPgpKeyIdResponse, e return response, nil } -// ParsePostRpcPgpKeyIdResponse parses an HTTP response from a PostRpcPgpKeyIdWithResponse call -func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, error) { +// ParsePostServicesResponse parses an HTTP response from a PostServicesWithResponse call +func ParsePostServicesResponse(rsp *http.Response) (*PostServicesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostRpcPgpKeyIdResponse{ + response := &PostServicesResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -2146,20 +15364,102 @@ func ParsePostRpcPgpKeyIdResponse(rsp *http.Response) (*PostRpcPgpKeyIdResponse, // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/8xXTY/iRhD9K1YlhxnFoR02J0d7mGiizWgPQbPJaYRQT7sw3tjdvdVttAj5v0fVhsUM", - "EDNAJhz4cFPueq9eUa+9BGUqazRq7yBdgpUkK/RI7RXhFGnEa+E6Q6eosL4wGlIYhV9RK4QYCl6ZocyQ", - "IAYtK/wWATE4NcNK8hao6wrSpzaRe+8KnZf4o3n+jMrDOAa/sHyn81ToHJqmiYHwS43O/2qyAgOMO8rD", - "pzLao/b8VVpbFkoyMvHZMbxlJ6klY5H86nZ+TQ1V0kMKzwuPEnbztmkLwozRdpCtoHJEN+lcZwObk/OD", - "NuCH60Hxi67L0r3nTa3lnd4AlMevXig3f4NkWyGeamzi0CHDS7UIc/nfO+S/BHFqg5yB6dX9cXKu3fbg", - "JfzqkbQs743aN9mM8/njb5/+jO6NqivUPlQPYqip5DnnvXWpEJbjCLmalAvUYv7TcJAIaYvBzFclNDwX", - "p4YT+MKXLXKpM0lZZOvnslDRinwMcyTXZuc9BsPoRv6MSTKd3vI2xqKWtoAU3g2SQQIxWOlnAbrgtxxD", - "j3P5AtSHDFL4gFwyQmeNdm1Nh0myS/ePj6GSrq4qSQtesKjvRg9RJyy68bPCRdmqHresheQx/AQP2pNx", - "FlXYbsxbCbJKSKoM/Ru4R6vuQky85TtPy9ZNvtRIC3gpX9dMeqfH+BX013RuyKrbqAU/bmJgkXfhc4sc", - "xv894RRS+E5s3FVsQsSWr7Yg1xa34FT7bt9yQREssDmb3VqqDI8R634VdbZcB/7Mp6u1xt+r10EKb6LY", - "8AzJNhTXouWoJyR1ZqpJXRdZj3gfUD+G4L849mQYL5P2Vvxl3svW/Wh/P9ubL+2rx3riMcedi2nZbS0n", - "S9/fU5846voGwjcCx/Tnfg5XPxE6HNe62dxOwpiYtI9irkfAUW6Dg/2+ir4+IXcZ9SraS+rqld1Huivx", - "37iY9A78UW4/4uIhu8bTVYfEMXIe4HHtp6wtluGEjTRfg988SaRClEbJcmacT98lSQLNuPknAAD///mR", - "0fSZEQAA", + "H4sIAAAAAAAC/+w9XXPcNpJ/BcW7Kid145HW+ag6XfnBazsbX2xFJduXh8Q1C5GYGUQkyACgFO2W/vsV", + "wG8SJEECJMcOXxJ52OxuoBv9BaD5b8cNgygkiHDmXPzbiSCFAeKIyn/5OMBc/OEh5lIccRwS58J5K37G", + "5AAg8cAVPGAC5ZONg8XjP2JEH5yNQ2CAnIsUycZh7hEFUGDjD5F4wDjF5OA8Pm6ccL9nyJhSiqWHFPUQ", + "bVL6WfwsYFpQy7e6MUcU7RF9GcZEMZIr+RARF2UUjggmOFMSCUSFBiJx4Fz86rgC53MSEuR82rRSvhKy", + "Y5ZJS4VgzxkmBx89DW9+Ry7vZCJktkdPEY8peU5RRBFDhGcqkP4eYIID6Bc/yHkS/2KhHwvY5/hAQoqe", + "enHkYxdyxKqPA0QPlacd47uWNE5hhEomKSQHNHgd1Vm9lli6tV1S+khG2AcltacSVZmkh/Yw9rlz4WCO", + "AiEyBRPh/Q/Y54huCeL3Ib1l2R877AkkqrVcgijT24c0gIKce4QUuhxRcAfpQ2ITukiH9AAJ/pccI9u6", + "FEGOvB3kbfRLEEr6HAeIcRhE4B7zIxD/BP9KdFqfDQ/5qGCjKp/34Z6DBADkxFoMXwnPdMyW/9UhuDqY", + "kiFMODpI9RpJPyFWn7NLGCAQ7gE/IlAGb/UXdYwTqFoceT2qVoKwKb0opBz6O+hKx7SjN9DdtovNTFIq", + "WrXf2kk3Aa2IoYOnmCHaz1AGNRk3NPRRrskqRgqAyXiQg/w9xEQoYPKgVU8VoEq+bsLQR5AM4oZtb7Dv", + "Y3LYJe+oWajATDAnC3qGOiNV3zCj1a8zcnAjjUVcg5pENoIGIhxzHwWol5sa5CQcCetISWlNda1mNfAk", + "fM3vq+scKK1/1Vt/JPiPGAHsCUntMaJgH1Lpu5OXQWFkFnMbjYFII5in3Bp8lV6YbnoLIjupZXfQH8xe", + "8aaSzyi+8bG7jXxIypB2mKYRG86veMn+lMoBdvmgBtwkaieAIrRj8U2+ZJSL6L2EA2W4+opKnWbLMmoh", + "NMmgTiQWZknUo2Ozm4BWJyZKqhlizmU0tnj0UWdo6oShTk/xe3/iUAWeVEDLJxB1jhZfUwVD7JT09wQi", + "6DIzKAh/x218JA8nUhO23cO7kGKOdgzRO+yiHfZa3a0SVo+zXz+N4O1UqgQqnkpLreJ0ta1R+a05uT0R", + "k6nkrcvbtoHPyZ9+gK9+yapT7OFQO9jvedt2wK8/AI3Av/1Fy1PNkEsR392ih90RsmMz1v4RsiPyQAIH", + "btGDDK9LOACM+VHE3m5X2blOZzLtLhGi6I8YU9RqF1SgFmp7ZW6WDlSEIrNEncs61b3U1dDmildihkKO", + "qquhqnXXkCMgnwNMgJAOYpyBCFGhiSHx2uojCuRWGY8ZPKBdy/GDd/BPHMQBkEAA+n54jzwpN0xkjadk", + "Ulq5L1OYivV+G9r6gmWzmfJ3CmUINSsDoiD1OzZZFL5g+YQj4WLpTCPhIjO6XoAVZx9+OSJ+RBQIWHCE", + "DEg4EFF8h310QAxAl4aMlQqwPYVXScfcSVSYlx4eBRD7rfVi+RRAz6OIsbxkLF7s5reE2r4eLl4XSNhg", + "+ECQt4ujVj+fA9gS3NJu/T6kt4iyPDH0IIfL7iUqOTqZvSsld+E9Ka875V5RCWQmfnpWUxVocp5OpFKh", + "w9uym1RdHC4b1ig5W3ovICu0IeJFIV70DEKTleyvDnUvgxgoTwftLn2pAnVF5HXIYcwU5dD2FDqHmEgv", + "FnO1GSt76Ps30L09ARUtWMn+2sXUb69ql2CsSqfgo/6LhqqUQS0snSYv82trwcPS2sq20OX4rtVypE8N", + "4uCc0A3isDXMFM9sEHHDQISrLGxPvssglkhGMUe7mGDOdhGiO4p8+NBMzV6GTFan0heAfEHmZgi6R5C8", + "tWnjWUnDfD0sb6UWrAzkHBwh9QpDgwi88dvLwGpgG6o0/4n/nHTi/3M/2uUnVKB2mfkjhj7mD9oSaYW3", + "IZTMaHthADFR1J7/D/rYA+njtNaCGUjfa93fqGK1tHvc4Hp251aQ7koTKjDTkE8y37QE1sdHFdgyQxzy", + "mGktLRXoJMwkdLu5yH5V2Vv0J9emeHfYYbfdH+fPjSnNHEwx5CNXsauTsIXJAbwM/TiQi1ute/L9rstp", + "YpzJXtbfQw8jqcYv6EH+3w0JR8lFhNLm29nvLJnqAmlEwwhRnr5eNYUPHEH19OZ7ob86pQt66bVJAVEm", + "eke8bXSgjG8TgP86HS7+h8S+z57LE5xR4kImZ0oo7ZnL7mYgVgHhNEaPG6khz2ypSPsCnFFDpmRirIIY", + "8DRYP0bTUqlHdsF0kIb8J0V758L5j7Pilv1Z8pSd5QhHCN0e3k45apNRi0bz9cdNzRUUzzaVeyT25r6K", + "1bIARiAfLYUmreGiqONoyKMGsHEUt/2siUaF27KARpMYLaY2isOFpcbUEJkSrC44NpHQ2LQCY7MKi1kR", + "FOsXUmVl1Y7iWxdUHf9EAhtFxlhwKqrjBdjE1irIBqhKoGxCYbLpBclmFyKzJkCmJ7zySpTH1WxLLEE6", + "jagG4DaVUUFqtHAyFG1SSZ9vyuebrIsjQTqNOAbgNhVHQWq0ODIUbeJIn2+cxg6yNZk0MVsWzEgCo6Wj", + "pjdcRCo8DTkpgDaNPWH7wiowTySsgQSMhVWlN15YZTytwioB5cKyLqOpRDOTRAwF0TX/Cer0BYGvXOqp", + "XYmPI2EJkQdu/NC9dY8QE5CBg6+uQvcWcRBATAjiG8AR4/IPxN3t186mVqyqblzW+k2FHF38Rj4cMQOY", + "AQiuKA4gfQA/oYftb/H5+TdudHsm/0DOpnuLI4B/vkXkwI/OxbfP+uphJaaalTFFPaa+Wx9EkGDEQEiB", + "GzMeBoiCAw3jiAF+hBy4kIAbBCDn0D0iD/AQXCU9OV5keVB9nqp77UVfuJcfr69fX37YfXjz7vX7Dy/e", + "XZUnQn9TYuOMaZY2ipCieYodsTdOL2Q/1IkO7m6mq1nf/7divNW9JeuSq6lus+dMc+gqnW4pZ9WuCDBE", + "AQ19xGRbwwjRADMmVoHcvGYRcvEeu7UGM01lnkvqGl1yGmR/CCnCByLIinX5z97OO/9MudvfAg5vfPT8", + "Se2VJ8CVu3n1BzvsPRluvb75XqFjzfsR40apum3ROj4J3Bhc+patkVWauOlienauWofqVmz5gtxDn6H8", + "veyoR319ySWlOoLeuHxScN6/3hRe5F3sc/yUIwIJz1dSYg1kQihXYHrJQt72O9DMXFUXW/2yhtEkzuyG", + "RqFodlTTHvJ337Xga94tMcPZ2tnMIIgZ41rrdqCzJ2nTElTAC1NQe++JHbOd6doBkR2FxAuDXRxj7ysR", + "VI5rffYb+Y1MFGR2mWn1PZIxU9PSqyDrqezJg55BSPjR2TgPCFJhiwbepd04vY3FhrBeuaIyzkupr8+2", + "+ikJ3vBT+XtPrGQQG2eSlmJmVmbi0HPjKC/32MvDOvxsoUZd3lWxhaSIaKHrIsaAGxJOQ78Wy1Zq4rNn", + "ZXNHyo0uNyOj5d4OOu1Rc+nVZuRcwbFGz30jmzf3rMTG9RZItUnWW7WKuPhF6SlI11/W+KKWd6b8HxGm", + "ILwngOatPpLomSHOMTksXmwZhSLveKarIH9TKUhb77Keg+TJ1wiax05zCpBS+PBXTME7upqZ+fIOC60f", + "GC8R7CqakxnFWb1NxcY6vHmD6c6GXVpDmKKhlpmOtnTE6iuxzO2nelxUyVZ1eKn8UETNPd1B7AsbVA3w", + "k5KNmP6+Qn97By09vbbV80qfmrVGVaNIzrBWh6Ssk21RbZy+flH6yM81V4hWkpUfR2lmVgzcH0O525Wm", + "WOUSDPHADfJDchA+Poh9jiMfte8ZfA4xWbNFVNXw2WgZ1TSelno7WQlP9HOoCSOPSpumE3U+xT5BU3wd", + "i03VYkXhhJKnQDyVYk7efpq+nW8biPWVZlJyFPIuY6IlW5BcRgMxE5C//Pj6+jWomwXwHDy5evvicvfx", + "8u2bd28+vH71BLy4fAXKWw4CJimNPZl2a2KKMn2tcZMNZCexQsZkZZ9DXfyLLS5PUGhtmBjleca26DYD", + "AgJNqRdFcXd9Zvdda6U0fcm00T+p+FJpgPjff/jgbBw3ZEEoYpnr1+/Fv//3/c+XT6+vXjob55f3752N", + "cxD/UISmPd2UNk71lv5AVVfc9W8qeAZUKHcBbU2tZ3W9tVZaxQx+6lgNlQOjteva6SPw8fptumuQzhm4", + "PyIZyUklyxcU2Cft/WZeGvUWTqZJvrIR0/QLblX54Srf0gqr3MCjoh0dK0H3KGi+BvY0DGSCkR4JvUxO", + "VTb0v+gj1R+rZ62g+iFr/Zy0XrDajUlLpz+HrLa1xVH/nA463VtfsorPGTeXbAZULNkC2taSbelwpL/x", + "ojoW2tWpqH9izVsLWdvhGWSWJyyP1ZsHmYmntReQLtrvzpVnRJQNfQxZrTXm6en9sHHKfXV6gZfxVxU3", + "lbV6qum8umkF+jM5WfcqdBXL4ipk/CCCcfAqdOOg9J15KQrnyHnELs7OIgFHEePbkB7OEDm7+9uz7fkZ", + "jPD2yAM/OcK3D+UCwdxPex8RD1IPJOYCpHczNs4doiyhLnBsn4Gv4Lfo/Hy//1pWBSJEYISdC+eb7fn2", + "XHhHyI+S9TPxnwOSE5+Xat54zoXzD8STz/dHIWGJF312ft4c7s8/Jfc64kCsOvFDhMiLqzegBAa+kpbB", + "S+fjayEjeGBCGm8IpyGLkCvRfRKozqoXQ4RzabL3Sv5+mUGKIVEYIC4Lxb+qL6sUIGfdX7R/3PQiiCja", + "I3qNeEyJ8/ipMVPfqiwVeJneNKrOmOl1l2wu83n79LhpFepyU5a2lNKADKknY5d+niA5IG3AjwTrkd/v", + "GdKCTCpI2uryUp4IV2jL+aBraLnj1Ov8Uvenw++nzUCw8+KaOX31jTZTvI2rbsIYbpxn598r3AKkHEN/", + "ThMQQe4em0bgSvx8UpYzayL30CaLSp+5ikROzewKr66Y8pCNN7z6djOZWkHM+sT+TZGkJonl9LMqYgLF", + "hciuwODnCvh4He+8rKDleHRQyejTAFkpAzfAUioUGGApBfMzh1GWLsVmCljVuK6QalW2z0PZ1gB0zgC0", + "0c5ulijUAlXzULSfCYN4tA+5vaB0coPaFaCuRvWz9eADo86GQp9yDNAe35sp7HxBft90a0f6E8+1iPpb", + "W0Z0xf4JiZTCtXhlvPVQMLAdajZUOJqno2yhzA5/GeMrmgsYo1L1RZg5ORjfVyTTT5UudmUFqxp+IWq4", + "pg1zpg0tLZVnSR6s0TZPIXRZMUgk9EjYSyemM8FdecRqhr/caGBg5Nui8CcZVbTnGeYKPV+uoTfj2hnH", + "VNPdTDXYwDSDWbMqzK41MCx5tPBWXIIwwta8cmCETt3xysZ4FddGpkFb3BWdCD+NmBnqyoUqI0wt3YyM", + "cNYasxnjqt32MsI3tsZXxzO2ytdYfYvt1Bk0HlQbcqafia+WerXUq6VeLfWXa6nXetVy9Sq2UK2KnUad", + "ik1bo5p2u3uiqES7OLVGJmtkskYma2Tyl8ohjQqKpqdFprL4erVb9tkUbo2OiUwyyeWKrbIDs0bltnjP", + "0rZQjZHRW0N1POpmgjZRG20T1XGa2pY6vuXqVINbd9cVtq6aGlWqVSu/RK1cc/IlcnLFh4Jnzc2t0LeX", + "o+uwYyFX7ydj+UyJbQutkbGvVvovEjuMjJsVa+DU4pDeLMVQx+dPVvonfdhJE7szrk5Z2Ih0hVm1N2wa", + "G2GtBtnD6fj6XBlx8qmLKfgzLfdpozcs++nTGV3+6yFRXpfG+JVfHTHGWv8egk2EeY8iY6SmRcIyLnsO", + "eckDJ9N80afd5rNhmf5q0FeDvhr01aB/2QZ9rYEtWwNjC9a/2OnUvtj0da9pz6ksE8wMKoqtAc0a0KwB", + "zRrQ/OUyVOPKpemRloWcg34tmX1WhWSjky9LyKJUZS59PrK/vHwlgY29tvrTRqMWphqVsQ1O0da/KmkP", + "lZmXK+GsfWLTEFvze59z1+CGf7a0puqJQvdX1lZdXnV5LT+cRPkhWbIz1x0MiForOLTzYF5paMNtscRg", + "0Vb3Fw5We73a6wmzq3y5nEjw0pcsjVsOs2dJbdOqnx5Zm9NS0lP6VHh/0iM/IG5ueCRNG8fhmoiS7wKP", + "x1V8p9qYn+ST4+PRGNZ8EiSGxZ4EybIXCsy+WF9bAYm696dEq6avmr5mSKeYISUreOYMyYCotQypnQfz", + "DKkNt92LBxNZ8v6EabXmqzWfL3/KF9NpBj596dS4xTJ7OtU2y4OuLEwyxaXs6j6kt4iy/MSEB5NvZXcH", + "n78kb6V53CvxjrHtUnFi6TyHErWdNiNdXJtVrJSYjfts6Myy4fERJQlLbTOUuJPPLY93UB1IB/jQNdZe", + "INZWmq+ZQ297PFiLxLVZMg/MNUlZ3MlICAFBSBYVE0aepozkjUdy15UexZALGkgrsQWJAQAxE5C//Pj6", + "+jWoG23wHDy5evvicvfx8u2bd28+vH71BLy4fAXKJljAJA2LnjS9rXJmEudLI/cM0iCkXa72OnJfSJiG", + "a8VilpJPt5e/hM5pjDYlMeZfVr954AgqPqP+acDnwLPBfUUj92uQMN8drLXzrxd/iR/YuAjsBT2oIq+h", + "o8tE5SEdYb1KoYzFpf6qvoG0Mv575dU6hFkk9sxAZMUQM6EdENlRSLww2MUx9nqE9w9EriXwRwE7mo06", + "0d4Zr9O1O+/aPjfVtcQXjXGYIxB0ersmPrWrqsM91lfYo0VZllWLQZ/369R7AXV6BiEfgI5+qsdw8hah", + "NMZMbtEh2kkzsTsi6KXbih0CvDpE0oP9mEKfniCbI+qVaO+gTl6yqkGXRXyLHna9Bv/qEP2EHt54pxhd", + "lQahI86WcZx6lFUZpZBfdm0CES8KsdYnW94nr7zO3xhfhmpQ32Z/DS5WNFEVN0JMMeVMDS8BNZGNLWI3", + "MS3YCSA/dJJxA8TUJAdOEHSPIOW2lKE1Na1rw31Vss9SydaC3JwFueaSmqsMZ4myefFNjxGDkpsOgSmO", + "DJsa1q7979W4fikefGD0qFTmk4gD2uNtY2WdbxNaZ3pHHOw1m9tylL+Hvn8D3Vv9KP+H/A1zG5FTb/wy", + "eoU3UZpjypmKqW+Ky9RUFJiWC/YzFQAfr9+m7RsT7hi4PyICIooFZK6mDOwh9hVaWWifRuS/Kt5nqXhr", + "ArBEAlCsrLkTAEPK9hKAbkYsJABdBOwlABMZW41sYDW4X4qnHxm1VhT89OKF3gxhvALPnyF0zbV2hjDJ", + "RJfSBf0swYLNMF7XBYLhB0tzFAIw5mgXE8zZLkJ0R5EvTLwRQ14YQEyYIZbkdCT0PIrYWFwE8fuQ3o6f", + "Y+hyfDd2dm+QPKc2UjCYHHYsHHppPMfwRwx9zB8KT4SIyK7HTsQRUs8WLnZ32GF39Mii+MbHbp70j/Zm", + "bMs45DGziCnZ0h2HYuyVkUJnzFzykjn3+ziKQsqRB2780L11jxCTwrrvaRjISwlXoXuLOLhMVnXTsmtl", + "2qvxXo33arxX4/2XNt5r3WqButXs5aqlq1RTFaemrUlZDUY0KlFrQLIGJGtAsgYkazZpo65rWs61a/37", + "irifQfHWqGZrcTYlYkTvsnkSy+vCOXIeXZyd+aEL/WPI+MU35+fnzuOnx/8PAAD//7aZgPw+NwEA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/portal-db/sdk/go/models.go b/portal-db/sdk/go/models.go index 823465bb1..ce5370d49 100644 --- a/portal-db/sdk/go/models.go +++ b/portal-db/sdk/go/models.go @@ -3,54 +3,1715 @@ // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. package portaldb +// Defines values for PortalAccountsPortalAccountUserLimitInterval. +const ( + PortalAccountsPortalAccountUserLimitIntervalDay PortalAccountsPortalAccountUserLimitInterval = "day" + PortalAccountsPortalAccountUserLimitIntervalMonth PortalAccountsPortalAccountUserLimitInterval = "month" + PortalAccountsPortalAccountUserLimitIntervalYear PortalAccountsPortalAccountUserLimitInterval = "year" +) + +// Defines values for PortalApplicationsPortalApplicationUserLimitInterval. +const ( + PortalApplicationsPortalApplicationUserLimitIntervalDay PortalApplicationsPortalApplicationUserLimitInterval = "day" + PortalApplicationsPortalApplicationUserLimitIntervalMonth PortalApplicationsPortalApplicationUserLimitInterval = "month" + PortalApplicationsPortalApplicationUserLimitIntervalYear PortalApplicationsPortalApplicationUserLimitInterval = "year" +) + +// Defines values for PortalPlansPlanUsageLimitInterval. +const ( + Day PortalPlansPlanUsageLimitInterval = "day" + Month PortalPlansPlanUsageLimitInterval = "month" + Year PortalPlansPlanUsageLimitInterval = "year" +) + +// Defines values for ServiceEndpointsEndpointType. +const ( + CometBFT ServiceEndpointsEndpointType = "cometBFT" + Cosmos ServiceEndpointsEndpointType = "cosmos" + GRPC ServiceEndpointsEndpointType = "gRPC" + JSONRPC ServiceEndpointsEndpointType = "JSON-RPC" + REST ServiceEndpointsEndpointType = "REST" + WSS ServiceEndpointsEndpointType = "WSS" +) + +// Defines values for PreferCount. +const ( + PreferCountCountNone PreferCount = "count=none" +) + // Defines values for PreferParams. const ( PreferParamsParamsSingleObject PreferParams = "params=single-object" ) -// Defines values for PostRpcArmorParamsPrefer. -const ( - PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" -) +// Defines values for PreferPost. +const ( + PreferPostResolutionIgnoreDuplicates PreferPost = "resolution=ignore-duplicates" + PreferPostResolutionMergeDuplicates PreferPost = "resolution=merge-duplicates" + PreferPostReturnMinimal PreferPost = "return=minimal" + PreferPostReturnNone PreferPost = "return=none" + PreferPostReturnRepresentation PreferPost = "return=representation" +) + +// Defines values for PreferReturn. +const ( + PreferReturnReturnMinimal PreferReturn = "return=minimal" + PreferReturnReturnNone PreferReturn = "return=none" + PreferReturnReturnRepresentation PreferReturn = "return=representation" +) + +// Defines values for DeleteNetworksParamsPrefer. +const ( + DeleteNetworksParamsPreferReturnMinimal DeleteNetworksParamsPrefer = "return=minimal" + DeleteNetworksParamsPreferReturnNone DeleteNetworksParamsPrefer = "return=none" + DeleteNetworksParamsPreferReturnRepresentation DeleteNetworksParamsPrefer = "return=representation" +) + +// Defines values for GetNetworksParamsPrefer. +const ( + GetNetworksParamsPreferCountNone GetNetworksParamsPrefer = "count=none" +) + +// Defines values for PatchNetworksParamsPrefer. +const ( + PatchNetworksParamsPreferReturnMinimal PatchNetworksParamsPrefer = "return=minimal" + PatchNetworksParamsPreferReturnNone PatchNetworksParamsPrefer = "return=none" + PatchNetworksParamsPreferReturnRepresentation PatchNetworksParamsPrefer = "return=representation" +) + +// Defines values for PostNetworksParamsPrefer. +const ( + PostNetworksParamsPreferResolutionIgnoreDuplicates PostNetworksParamsPrefer = "resolution=ignore-duplicates" + PostNetworksParamsPreferResolutionMergeDuplicates PostNetworksParamsPrefer = "resolution=merge-duplicates" + PostNetworksParamsPreferReturnMinimal PostNetworksParamsPrefer = "return=minimal" + PostNetworksParamsPreferReturnNone PostNetworksParamsPrefer = "return=none" + PostNetworksParamsPreferReturnRepresentation PostNetworksParamsPrefer = "return=representation" +) + +// Defines values for DeleteOrganizationsParamsPrefer. +const ( + DeleteOrganizationsParamsPreferReturnMinimal DeleteOrganizationsParamsPrefer = "return=minimal" + DeleteOrganizationsParamsPreferReturnNone DeleteOrganizationsParamsPrefer = "return=none" + DeleteOrganizationsParamsPreferReturnRepresentation DeleteOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for GetOrganizationsParamsPrefer. +const ( + GetOrganizationsParamsPreferCountNone GetOrganizationsParamsPrefer = "count=none" +) + +// Defines values for PatchOrganizationsParamsPrefer. +const ( + PatchOrganizationsParamsPreferReturnMinimal PatchOrganizationsParamsPrefer = "return=minimal" + PatchOrganizationsParamsPreferReturnNone PatchOrganizationsParamsPrefer = "return=none" + PatchOrganizationsParamsPreferReturnRepresentation PatchOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for PostOrganizationsParamsPrefer. +const ( + PostOrganizationsParamsPreferResolutionIgnoreDuplicates PostOrganizationsParamsPrefer = "resolution=ignore-duplicates" + PostOrganizationsParamsPreferResolutionMergeDuplicates PostOrganizationsParamsPrefer = "resolution=merge-duplicates" + PostOrganizationsParamsPreferReturnMinimal PostOrganizationsParamsPrefer = "return=minimal" + PostOrganizationsParamsPreferReturnNone PostOrganizationsParamsPrefer = "return=none" + PostOrganizationsParamsPreferReturnRepresentation PostOrganizationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalAccountRbacParamsPrefer. +const ( + DeletePortalAccountRbacParamsPreferReturnMinimal DeletePortalAccountRbacParamsPrefer = "return=minimal" + DeletePortalAccountRbacParamsPreferReturnNone DeletePortalAccountRbacParamsPrefer = "return=none" + DeletePortalAccountRbacParamsPreferReturnRepresentation DeletePortalAccountRbacParamsPrefer = "return=representation" +) + +// Defines values for GetPortalAccountRbacParamsPrefer. +const ( + GetPortalAccountRbacParamsPreferCountNone GetPortalAccountRbacParamsPrefer = "count=none" +) + +// Defines values for PatchPortalAccountRbacParamsPrefer. +const ( + PatchPortalAccountRbacParamsPreferReturnMinimal PatchPortalAccountRbacParamsPrefer = "return=minimal" + PatchPortalAccountRbacParamsPreferReturnNone PatchPortalAccountRbacParamsPrefer = "return=none" + PatchPortalAccountRbacParamsPreferReturnRepresentation PatchPortalAccountRbacParamsPrefer = "return=representation" +) + +// Defines values for PostPortalAccountRbacParamsPrefer. +const ( + PostPortalAccountRbacParamsPreferResolutionIgnoreDuplicates PostPortalAccountRbacParamsPrefer = "resolution=ignore-duplicates" + PostPortalAccountRbacParamsPreferResolutionMergeDuplicates PostPortalAccountRbacParamsPrefer = "resolution=merge-duplicates" + PostPortalAccountRbacParamsPreferReturnMinimal PostPortalAccountRbacParamsPrefer = "return=minimal" + PostPortalAccountRbacParamsPreferReturnNone PostPortalAccountRbacParamsPrefer = "return=none" + PostPortalAccountRbacParamsPreferReturnRepresentation PostPortalAccountRbacParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalAccountsParamsPrefer. +const ( + DeletePortalAccountsParamsPreferReturnMinimal DeletePortalAccountsParamsPrefer = "return=minimal" + DeletePortalAccountsParamsPreferReturnNone DeletePortalAccountsParamsPrefer = "return=none" + DeletePortalAccountsParamsPreferReturnRepresentation DeletePortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalAccountsParamsPrefer. +const ( + GetPortalAccountsParamsPreferCountNone GetPortalAccountsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalAccountsParamsPrefer. +const ( + PatchPortalAccountsParamsPreferReturnMinimal PatchPortalAccountsParamsPrefer = "return=minimal" + PatchPortalAccountsParamsPreferReturnNone PatchPortalAccountsParamsPrefer = "return=none" + PatchPortalAccountsParamsPreferReturnRepresentation PatchPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalAccountsParamsPrefer. +const ( + PostPortalAccountsParamsPreferResolutionIgnoreDuplicates PostPortalAccountsParamsPrefer = "resolution=ignore-duplicates" + PostPortalAccountsParamsPreferResolutionMergeDuplicates PostPortalAccountsParamsPrefer = "resolution=merge-duplicates" + PostPortalAccountsParamsPreferReturnMinimal PostPortalAccountsParamsPrefer = "return=minimal" + PostPortalAccountsParamsPreferReturnNone PostPortalAccountsParamsPrefer = "return=none" + PostPortalAccountsParamsPreferReturnRepresentation PostPortalAccountsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalApplicationRbacParamsPrefer. +const ( + DeletePortalApplicationRbacParamsPreferReturnMinimal DeletePortalApplicationRbacParamsPrefer = "return=minimal" + DeletePortalApplicationRbacParamsPreferReturnNone DeletePortalApplicationRbacParamsPrefer = "return=none" + DeletePortalApplicationRbacParamsPreferReturnRepresentation DeletePortalApplicationRbacParamsPrefer = "return=representation" +) + +// Defines values for GetPortalApplicationRbacParamsPrefer. +const ( + GetPortalApplicationRbacParamsPreferCountNone GetPortalApplicationRbacParamsPrefer = "count=none" +) + +// Defines values for PatchPortalApplicationRbacParamsPrefer. +const ( + PatchPortalApplicationRbacParamsPreferReturnMinimal PatchPortalApplicationRbacParamsPrefer = "return=minimal" + PatchPortalApplicationRbacParamsPreferReturnNone PatchPortalApplicationRbacParamsPrefer = "return=none" + PatchPortalApplicationRbacParamsPreferReturnRepresentation PatchPortalApplicationRbacParamsPrefer = "return=representation" +) + +// Defines values for PostPortalApplicationRbacParamsPrefer. +const ( + PostPortalApplicationRbacParamsPreferResolutionIgnoreDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=ignore-duplicates" + PostPortalApplicationRbacParamsPreferResolutionMergeDuplicates PostPortalApplicationRbacParamsPrefer = "resolution=merge-duplicates" + PostPortalApplicationRbacParamsPreferReturnMinimal PostPortalApplicationRbacParamsPrefer = "return=minimal" + PostPortalApplicationRbacParamsPreferReturnNone PostPortalApplicationRbacParamsPrefer = "return=none" + PostPortalApplicationRbacParamsPreferReturnRepresentation PostPortalApplicationRbacParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalApplicationsParamsPrefer. +const ( + DeletePortalApplicationsParamsPreferReturnMinimal DeletePortalApplicationsParamsPrefer = "return=minimal" + DeletePortalApplicationsParamsPreferReturnNone DeletePortalApplicationsParamsPrefer = "return=none" + DeletePortalApplicationsParamsPreferReturnRepresentation DeletePortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for GetPortalApplicationsParamsPrefer. +const ( + GetPortalApplicationsParamsPreferCountNone GetPortalApplicationsParamsPrefer = "count=none" +) + +// Defines values for PatchPortalApplicationsParamsPrefer. +const ( + PatchPortalApplicationsParamsPreferReturnMinimal PatchPortalApplicationsParamsPrefer = "return=minimal" + PatchPortalApplicationsParamsPreferReturnNone PatchPortalApplicationsParamsPrefer = "return=none" + PatchPortalApplicationsParamsPreferReturnRepresentation PatchPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for PostPortalApplicationsParamsPrefer. +const ( + PostPortalApplicationsParamsPreferResolutionIgnoreDuplicates PostPortalApplicationsParamsPrefer = "resolution=ignore-duplicates" + PostPortalApplicationsParamsPreferResolutionMergeDuplicates PostPortalApplicationsParamsPrefer = "resolution=merge-duplicates" + PostPortalApplicationsParamsPreferReturnMinimal PostPortalApplicationsParamsPrefer = "return=minimal" + PostPortalApplicationsParamsPreferReturnNone PostPortalApplicationsParamsPrefer = "return=none" + PostPortalApplicationsParamsPreferReturnRepresentation PostPortalApplicationsParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalPlansParamsPrefer. +const ( + DeletePortalPlansParamsPreferReturnMinimal DeletePortalPlansParamsPrefer = "return=minimal" + DeletePortalPlansParamsPreferReturnNone DeletePortalPlansParamsPrefer = "return=none" + DeletePortalPlansParamsPreferReturnRepresentation DeletePortalPlansParamsPrefer = "return=representation" +) + +// Defines values for GetPortalPlansParamsPrefer. +const ( + GetPortalPlansParamsPreferCountNone GetPortalPlansParamsPrefer = "count=none" +) + +// Defines values for PatchPortalPlansParamsPrefer. +const ( + PatchPortalPlansParamsPreferReturnMinimal PatchPortalPlansParamsPrefer = "return=minimal" + PatchPortalPlansParamsPreferReturnNone PatchPortalPlansParamsPrefer = "return=none" + PatchPortalPlansParamsPreferReturnRepresentation PatchPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for PostPortalPlansParamsPrefer. +const ( + PostPortalPlansParamsPreferResolutionIgnoreDuplicates PostPortalPlansParamsPrefer = "resolution=ignore-duplicates" + PostPortalPlansParamsPreferResolutionMergeDuplicates PostPortalPlansParamsPrefer = "resolution=merge-duplicates" + PostPortalPlansParamsPreferReturnMinimal PostPortalPlansParamsPrefer = "return=minimal" + PostPortalPlansParamsPreferReturnNone PostPortalPlansParamsPrefer = "return=none" + PostPortalPlansParamsPreferReturnRepresentation PostPortalPlansParamsPrefer = "return=representation" +) + +// Defines values for DeletePortalUsersParamsPrefer. +const ( + DeletePortalUsersParamsPreferReturnMinimal DeletePortalUsersParamsPrefer = "return=minimal" + DeletePortalUsersParamsPreferReturnNone DeletePortalUsersParamsPrefer = "return=none" + DeletePortalUsersParamsPreferReturnRepresentation DeletePortalUsersParamsPrefer = "return=representation" +) + +// Defines values for GetPortalUsersParamsPrefer. +const ( + GetPortalUsersParamsPreferCountNone GetPortalUsersParamsPrefer = "count=none" +) + +// Defines values for PatchPortalUsersParamsPrefer. +const ( + PatchPortalUsersParamsPreferReturnMinimal PatchPortalUsersParamsPrefer = "return=minimal" + PatchPortalUsersParamsPreferReturnNone PatchPortalUsersParamsPrefer = "return=none" + PatchPortalUsersParamsPreferReturnRepresentation PatchPortalUsersParamsPrefer = "return=representation" +) + +// Defines values for PostPortalUsersParamsPrefer. +const ( + PostPortalUsersParamsPreferResolutionIgnoreDuplicates PostPortalUsersParamsPrefer = "resolution=ignore-duplicates" + PostPortalUsersParamsPreferResolutionMergeDuplicates PostPortalUsersParamsPrefer = "resolution=merge-duplicates" + PostPortalUsersParamsPreferReturnMinimal PostPortalUsersParamsPrefer = "return=minimal" + PostPortalUsersParamsPreferReturnNone PostPortalUsersParamsPrefer = "return=none" + PostPortalUsersParamsPreferReturnRepresentation PostPortalUsersParamsPrefer = "return=representation" +) + +// Defines values for GetPortalWorkersAccountDataParamsPrefer. +const ( + GetPortalWorkersAccountDataParamsPreferCountNone GetPortalWorkersAccountDataParamsPrefer = "count=none" +) + +// Defines values for PostRpcArmorParamsPrefer. +const ( + PostRpcArmorParamsPreferParamsSingleObject PostRpcArmorParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcDearmorParamsPrefer. +const ( + PostRpcDearmorParamsPreferParamsSingleObject PostRpcDearmorParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcGenRandomUuidParamsPrefer. +const ( + PostRpcGenRandomUuidParamsPreferParamsSingleObject PostRpcGenRandomUuidParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcGenSaltParamsPrefer. +const ( + PostRpcGenSaltParamsPreferParamsSingleObject PostRpcGenSaltParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcPgpArmorHeadersParamsPrefer. +const ( + PostRpcPgpArmorHeadersParamsPreferParamsSingleObject PostRpcPgpArmorHeadersParamsPrefer = "params=single-object" +) + +// Defines values for PostRpcPgpKeyIdParamsPrefer. +const ( + ParamsSingleObject PostRpcPgpKeyIdParamsPrefer = "params=single-object" +) + +// Defines values for DeleteServiceEndpointsParamsPrefer. +const ( + DeleteServiceEndpointsParamsPreferReturnMinimal DeleteServiceEndpointsParamsPrefer = "return=minimal" + DeleteServiceEndpointsParamsPreferReturnNone DeleteServiceEndpointsParamsPrefer = "return=none" + DeleteServiceEndpointsParamsPreferReturnRepresentation DeleteServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for GetServiceEndpointsParamsPrefer. +const ( + GetServiceEndpointsParamsPreferCountNone GetServiceEndpointsParamsPrefer = "count=none" +) + +// Defines values for PatchServiceEndpointsParamsPrefer. +const ( + PatchServiceEndpointsParamsPreferReturnMinimal PatchServiceEndpointsParamsPrefer = "return=minimal" + PatchServiceEndpointsParamsPreferReturnNone PatchServiceEndpointsParamsPrefer = "return=none" + PatchServiceEndpointsParamsPreferReturnRepresentation PatchServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for PostServiceEndpointsParamsPrefer. +const ( + PostServiceEndpointsParamsPreferResolutionIgnoreDuplicates PostServiceEndpointsParamsPrefer = "resolution=ignore-duplicates" + PostServiceEndpointsParamsPreferResolutionMergeDuplicates PostServiceEndpointsParamsPrefer = "resolution=merge-duplicates" + PostServiceEndpointsParamsPreferReturnMinimal PostServiceEndpointsParamsPrefer = "return=minimal" + PostServiceEndpointsParamsPreferReturnNone PostServiceEndpointsParamsPrefer = "return=none" + PostServiceEndpointsParamsPreferReturnRepresentation PostServiceEndpointsParamsPrefer = "return=representation" +) + +// Defines values for DeleteServiceFallbacksParamsPrefer. +const ( + DeleteServiceFallbacksParamsPreferReturnMinimal DeleteServiceFallbacksParamsPrefer = "return=minimal" + DeleteServiceFallbacksParamsPreferReturnNone DeleteServiceFallbacksParamsPrefer = "return=none" + DeleteServiceFallbacksParamsPreferReturnRepresentation DeleteServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for GetServiceFallbacksParamsPrefer. +const ( + GetServiceFallbacksParamsPreferCountNone GetServiceFallbacksParamsPrefer = "count=none" +) + +// Defines values for PatchServiceFallbacksParamsPrefer. +const ( + PatchServiceFallbacksParamsPreferReturnMinimal PatchServiceFallbacksParamsPrefer = "return=minimal" + PatchServiceFallbacksParamsPreferReturnNone PatchServiceFallbacksParamsPrefer = "return=none" + PatchServiceFallbacksParamsPreferReturnRepresentation PatchServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for PostServiceFallbacksParamsPrefer. +const ( + PostServiceFallbacksParamsPreferResolutionIgnoreDuplicates PostServiceFallbacksParamsPrefer = "resolution=ignore-duplicates" + PostServiceFallbacksParamsPreferResolutionMergeDuplicates PostServiceFallbacksParamsPrefer = "resolution=merge-duplicates" + PostServiceFallbacksParamsPreferReturnMinimal PostServiceFallbacksParamsPrefer = "return=minimal" + PostServiceFallbacksParamsPreferReturnNone PostServiceFallbacksParamsPrefer = "return=none" + PostServiceFallbacksParamsPreferReturnRepresentation PostServiceFallbacksParamsPrefer = "return=representation" +) + +// Defines values for DeleteServicesParamsPrefer. +const ( + DeleteServicesParamsPreferReturnMinimal DeleteServicesParamsPrefer = "return=minimal" + DeleteServicesParamsPreferReturnNone DeleteServicesParamsPrefer = "return=none" + DeleteServicesParamsPreferReturnRepresentation DeleteServicesParamsPrefer = "return=representation" +) + +// Defines values for GetServicesParamsPrefer. +const ( + CountNone GetServicesParamsPrefer = "count=none" +) + +// Defines values for PatchServicesParamsPrefer. +const ( + PatchServicesParamsPreferReturnMinimal PatchServicesParamsPrefer = "return=minimal" + PatchServicesParamsPreferReturnNone PatchServicesParamsPrefer = "return=none" + PatchServicesParamsPreferReturnRepresentation PatchServicesParamsPrefer = "return=representation" +) + +// Defines values for PostServicesParamsPrefer. +const ( + ResolutionIgnoreDuplicates PostServicesParamsPrefer = "resolution=ignore-duplicates" + ResolutionMergeDuplicates PostServicesParamsPrefer = "resolution=merge-duplicates" + ReturnMinimal PostServicesParamsPrefer = "return=minimal" + ReturnNone PostServicesParamsPrefer = "return=none" + ReturnRepresentation PostServicesParamsPrefer = "return=representation" +) + +// Networks Supported blockchain networks (Pocket mainnet, testnet, etc.) +type Networks struct { + // NetworkId Note: + // This is a Primary Key. + NetworkId string `json:"network_id"` +} + +// Organizations Companies or customer groups that can be attached to Portal Accounts +type Organizations struct { + CreatedAt *string `json:"created_at,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *string `json:"deleted_at,omitempty"` + + // OrganizationId Note: + // This is a Primary Key. + OrganizationId int `json:"organization_id"` + + // OrganizationName Name of the organization + OrganizationName string `json:"organization_name"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalAccountRbac User roles and permissions for specific portal accounts +type PortalAccountRbac struct { + // Id Note: + // This is a Primary Key. + Id int `json:"id"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId string `json:"portal_account_id"` + + // PortalUserId Note: + // This is a Foreign Key to `portal_users.portal_user_id`. + PortalUserId string `json:"portal_user_id"` + RoleName string `json:"role_name"` + UserJoinedAccount *bool `json:"user_joined_account,omitempty"` +} + +// PortalAccounts Multi-tenant accounts with plans and billing integration +type PortalAccounts struct { + BillingType *string `json:"billing_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + GcpAccountId *string `json:"gcp_account_id,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + InternalAccountName *string `json:"internal_account_name,omitempty"` + + // OrganizationId Note: + // This is a Foreign Key to `organizations.organization_id`. + OrganizationId *int `json:"organization_id,omitempty"` + + // PortalAccountId Unique identifier for the portal account + // + // Note: + // This is a Primary Key. + PortalAccountId string `json:"portal_account_id"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *PortalAccountsPortalAccountUserLimitInterval `json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *int `json:"portal_account_user_limit_rps,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType string `json:"portal_plan_type"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *string `json:"stripe_subscription_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + +// PortalAccountsPortalAccountUserLimitInterval defines model for PortalAccounts.PortalAccountUserLimitInterval. +type PortalAccountsPortalAccountUserLimitInterval string + +// PortalApplicationRbac User access controls for specific applications +type PortalApplicationRbac struct { + CreatedAt *string `json:"created_at,omitempty"` + + // Id Note: + // This is a Primary Key. + Id int `json:"id"` + + // PortalApplicationId Note: + // This is a Foreign Key to `portal_applications.portal_application_id`. + PortalApplicationId string `json:"portal_application_id"` + + // PortalUserId Note: + // This is a Foreign Key to `portal_users.portal_user_id`. + PortalUserId string `json:"portal_user_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalApplications Applications created within portal accounts with their own rate limits and settings +type PortalApplications struct { + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + Emoji *string `json:"emoji,omitempty"` + FavoriteServiceIds *[]string `json:"favorite_service_ids,omitempty"` + + // PortalAccountId Note: + // This is a Foreign Key to `portal_accounts.portal_account_id`. + PortalAccountId string `json:"portal_account_id"` + PortalApplicationDescription *string `json:"portal_application_description,omitempty"` + + // PortalApplicationId Note: + // This is a Primary Key. + PortalApplicationId string `json:"portal_application_id"` + PortalApplicationName *string `json:"portal_application_name,omitempty"` + PortalApplicationUserLimit *int `json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *PortalApplicationsPortalApplicationUserLimitInterval `json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *int `json:"portal_application_user_limit_rps,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *string `json:"secret_key_hash,omitempty"` + SecretKeyRequired *bool `json:"secret_key_required,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalApplicationsPortalApplicationUserLimitInterval defines model for PortalApplications.PortalApplicationUserLimitInterval. +type PortalApplicationsPortalApplicationUserLimitInterval string + +// PortalPlans Available subscription plans for Portal Accounts +type PortalPlans struct { + PlanApplicationLimit *int `json:"plan_application_limit,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *int `json:"plan_rate_limit_rps,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *int `json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *PortalPlansPlanUsageLimitInterval `json:"plan_usage_limit_interval,omitempty"` + + // PortalPlanType Note: + // This is a Primary Key. + PortalPlanType string `json:"portal_plan_type"` + PortalPlanTypeDescription *string `json:"portal_plan_type_description,omitempty"` +} + +// PortalPlansPlanUsageLimitInterval defines model for PortalPlans.PlanUsageLimitInterval. +type PortalPlansPlanUsageLimitInterval string + +// PortalUsers Users who can access the portal and belong to multiple accounts +type PortalUsers struct { + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + + // PortalAdmin Whether user has admin privileges across the portal + PortalAdmin *bool `json:"portal_admin,omitempty"` + + // PortalUserEmail Unique email address for the user + PortalUserEmail string `json:"portal_user_email"` + + // PortalUserId Note: + // This is a Primary Key. + PortalUserId string `json:"portal_user_id"` + SignedUp *bool `json:"signed_up,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// PortalWorkersAccountData Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' +type PortalWorkersAccountData struct { + BillingType *string `json:"billing_type,omitempty"` + GcpEntitlementId *string `json:"gcp_entitlement_id,omitempty"` + OwnerEmail *string `json:"owner_email,omitempty"` + + // OwnerUserId Note: + // This is a Primary Key. + OwnerUserId *string `json:"owner_user_id,omitempty"` + + // PortalAccountId Note: + // This is a Primary Key. + PortalAccountId *string `json:"portal_account_id,omitempty"` + PortalAccountUserLimit *int `json:"portal_account_user_limit,omitempty"` + + // PortalPlanType Note: + // This is a Foreign Key to `portal_plans.portal_plan_type`. + PortalPlanType *string `json:"portal_plan_type,omitempty"` + UserAccountName *string `json:"user_account_name,omitempty"` +} + +// ServiceEndpoints Available endpoint types for each service +type ServiceEndpoints struct { + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId Note: + // This is a Primary Key. + EndpointId int `json:"endpoint_id"` + EndpointType *ServiceEndpointsEndpointType `json:"endpoint_type,omitempty"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// ServiceEndpointsEndpointType defines model for ServiceEndpoints.EndpointType. +type ServiceEndpointsEndpointType string + +// ServiceFallbacks Fallback URLs for services when primary endpoints fail +type ServiceFallbacks struct { + CreatedAt *string `json:"created_at,omitempty"` + FallbackUrl string `json:"fallback_url"` + + // ServiceFallbackId Note: + // This is a Primary Key. + ServiceFallbackId int `json:"service_fallback_id"` + + // ServiceId Note: + // This is a Foreign Key to `services.service_id`. + ServiceId string `json:"service_id"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Services Supported blockchain services from the Pocket Network +type Services struct { + Active *bool `json:"active,omitempty"` + Beta *bool `json:"beta,omitempty"` + ComingSoon *bool `json:"coming_soon,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *int `json:"compute_units_per_relay,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DeletedAt *string `json:"deleted_at,omitempty"` + HardFallbackEnabled *bool `json:"hard_fallback_enabled,omitempty"` + + // NetworkId Note: + // This is a Foreign Key to `networks.network_id`. + NetworkId *string `json:"network_id,omitempty"` + PublicEndpointUrl *string `json:"public_endpoint_url,omitempty"` + QualityFallbackEnabled *bool `json:"quality_fallback_enabled,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains []string `json:"service_domains"` + + // ServiceId Note: + // This is a Primary Key. + ServiceId string `json:"service_id"` + ServiceName string `json:"service_name"` + ServiceOwnerAddress *string `json:"service_owner_address,omitempty"` + StatusEndpointUrl *string `json:"status_endpoint_url,omitempty"` + StatusQuery *string `json:"status_query,omitempty"` + SvgIcon *string `json:"svg_icon,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// Limit defines model for limit. +type Limit = string + +// Offset defines model for offset. +type Offset = string + +// Order defines model for order. +type Order = string + +// PreferCount defines model for preferCount. +type PreferCount string + +// PreferParams defines model for preferParams. +type PreferParams string + +// PreferPost defines model for preferPost. +type PreferPost string + +// PreferReturn defines model for preferReturn. +type PreferReturn string + +// Range defines model for range. +type Range = string + +// RangeUnit defines model for rangeUnit. +type RangeUnit = string + +// RowFilterNetworksNetworkId defines model for rowFilter.networks.network_id. +type RowFilterNetworksNetworkId = string + +// RowFilterOrganizationsCreatedAt defines model for rowFilter.organizations.created_at. +type RowFilterOrganizationsCreatedAt = string + +// RowFilterOrganizationsDeletedAt defines model for rowFilter.organizations.deleted_at. +type RowFilterOrganizationsDeletedAt = string + +// RowFilterOrganizationsOrganizationId defines model for rowFilter.organizations.organization_id. +type RowFilterOrganizationsOrganizationId = string + +// RowFilterOrganizationsOrganizationName defines model for rowFilter.organizations.organization_name. +type RowFilterOrganizationsOrganizationName = string + +// RowFilterOrganizationsUpdatedAt defines model for rowFilter.organizations.updated_at. +type RowFilterOrganizationsUpdatedAt = string + +// RowFilterPortalAccountRbacId defines model for rowFilter.portal_account_rbac.id. +type RowFilterPortalAccountRbacId = string + +// RowFilterPortalAccountRbacPortalAccountId defines model for rowFilter.portal_account_rbac.portal_account_id. +type RowFilterPortalAccountRbacPortalAccountId = string + +// RowFilterPortalAccountRbacPortalUserId defines model for rowFilter.portal_account_rbac.portal_user_id. +type RowFilterPortalAccountRbacPortalUserId = string + +// RowFilterPortalAccountRbacRoleName defines model for rowFilter.portal_account_rbac.role_name. +type RowFilterPortalAccountRbacRoleName = string + +// RowFilterPortalAccountRbacUserJoinedAccount defines model for rowFilter.portal_account_rbac.user_joined_account. +type RowFilterPortalAccountRbacUserJoinedAccount = string + +// RowFilterPortalAccountsBillingType defines model for rowFilter.portal_accounts.billing_type. +type RowFilterPortalAccountsBillingType = string + +// RowFilterPortalAccountsCreatedAt defines model for rowFilter.portal_accounts.created_at. +type RowFilterPortalAccountsCreatedAt = string + +// RowFilterPortalAccountsDeletedAt defines model for rowFilter.portal_accounts.deleted_at. +type RowFilterPortalAccountsDeletedAt = string + +// RowFilterPortalAccountsGcpAccountId defines model for rowFilter.portal_accounts.gcp_account_id. +type RowFilterPortalAccountsGcpAccountId = string + +// RowFilterPortalAccountsGcpEntitlementId defines model for rowFilter.portal_accounts.gcp_entitlement_id. +type RowFilterPortalAccountsGcpEntitlementId = string + +// RowFilterPortalAccountsInternalAccountName defines model for rowFilter.portal_accounts.internal_account_name. +type RowFilterPortalAccountsInternalAccountName = string + +// RowFilterPortalAccountsOrganizationId defines model for rowFilter.portal_accounts.organization_id. +type RowFilterPortalAccountsOrganizationId = string + +// RowFilterPortalAccountsPortalAccountId defines model for rowFilter.portal_accounts.portal_account_id. +type RowFilterPortalAccountsPortalAccountId = string + +// RowFilterPortalAccountsPortalAccountUserLimit defines model for rowFilter.portal_accounts.portal_account_user_limit. +type RowFilterPortalAccountsPortalAccountUserLimit = string + +// RowFilterPortalAccountsPortalAccountUserLimitInterval defines model for rowFilter.portal_accounts.portal_account_user_limit_interval. +type RowFilterPortalAccountsPortalAccountUserLimitInterval = string + +// RowFilterPortalAccountsPortalAccountUserLimitRps defines model for rowFilter.portal_accounts.portal_account_user_limit_rps. +type RowFilterPortalAccountsPortalAccountUserLimitRps = string + +// RowFilterPortalAccountsPortalPlanType defines model for rowFilter.portal_accounts.portal_plan_type. +type RowFilterPortalAccountsPortalPlanType = string + +// RowFilterPortalAccountsStripeSubscriptionId defines model for rowFilter.portal_accounts.stripe_subscription_id. +type RowFilterPortalAccountsStripeSubscriptionId = string + +// RowFilterPortalAccountsUpdatedAt defines model for rowFilter.portal_accounts.updated_at. +type RowFilterPortalAccountsUpdatedAt = string + +// RowFilterPortalAccountsUserAccountName defines model for rowFilter.portal_accounts.user_account_name. +type RowFilterPortalAccountsUserAccountName = string + +// RowFilterPortalApplicationRbacCreatedAt defines model for rowFilter.portal_application_rbac.created_at. +type RowFilterPortalApplicationRbacCreatedAt = string + +// RowFilterPortalApplicationRbacId defines model for rowFilter.portal_application_rbac.id. +type RowFilterPortalApplicationRbacId = string + +// RowFilterPortalApplicationRbacPortalApplicationId defines model for rowFilter.portal_application_rbac.portal_application_id. +type RowFilterPortalApplicationRbacPortalApplicationId = string + +// RowFilterPortalApplicationRbacPortalUserId defines model for rowFilter.portal_application_rbac.portal_user_id. +type RowFilterPortalApplicationRbacPortalUserId = string + +// RowFilterPortalApplicationRbacUpdatedAt defines model for rowFilter.portal_application_rbac.updated_at. +type RowFilterPortalApplicationRbacUpdatedAt = string + +// RowFilterPortalApplicationsCreatedAt defines model for rowFilter.portal_applications.created_at. +type RowFilterPortalApplicationsCreatedAt = string + +// RowFilterPortalApplicationsDeletedAt defines model for rowFilter.portal_applications.deleted_at. +type RowFilterPortalApplicationsDeletedAt = string + +// RowFilterPortalApplicationsEmoji defines model for rowFilter.portal_applications.emoji. +type RowFilterPortalApplicationsEmoji = string + +// RowFilterPortalApplicationsFavoriteServiceIds defines model for rowFilter.portal_applications.favorite_service_ids. +type RowFilterPortalApplicationsFavoriteServiceIds = string + +// RowFilterPortalApplicationsPortalAccountId defines model for rowFilter.portal_applications.portal_account_id. +type RowFilterPortalApplicationsPortalAccountId = string + +// RowFilterPortalApplicationsPortalApplicationDescription defines model for rowFilter.portal_applications.portal_application_description. +type RowFilterPortalApplicationsPortalApplicationDescription = string + +// RowFilterPortalApplicationsPortalApplicationId defines model for rowFilter.portal_applications.portal_application_id. +type RowFilterPortalApplicationsPortalApplicationId = string + +// RowFilterPortalApplicationsPortalApplicationName defines model for rowFilter.portal_applications.portal_application_name. +type RowFilterPortalApplicationsPortalApplicationName = string + +// RowFilterPortalApplicationsPortalApplicationUserLimit defines model for rowFilter.portal_applications.portal_application_user_limit. +type RowFilterPortalApplicationsPortalApplicationUserLimit = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitInterval defines model for rowFilter.portal_applications.portal_application_user_limit_interval. +type RowFilterPortalApplicationsPortalApplicationUserLimitInterval = string + +// RowFilterPortalApplicationsPortalApplicationUserLimitRps defines model for rowFilter.portal_applications.portal_application_user_limit_rps. +type RowFilterPortalApplicationsPortalApplicationUserLimitRps = string + +// RowFilterPortalApplicationsSecretKeyHash defines model for rowFilter.portal_applications.secret_key_hash. +type RowFilterPortalApplicationsSecretKeyHash = string + +// RowFilterPortalApplicationsSecretKeyRequired defines model for rowFilter.portal_applications.secret_key_required. +type RowFilterPortalApplicationsSecretKeyRequired = string + +// RowFilterPortalApplicationsUpdatedAt defines model for rowFilter.portal_applications.updated_at. +type RowFilterPortalApplicationsUpdatedAt = string + +// RowFilterPortalPlansPlanApplicationLimit defines model for rowFilter.portal_plans.plan_application_limit. +type RowFilterPortalPlansPlanApplicationLimit = string + +// RowFilterPortalPlansPlanRateLimitRps defines model for rowFilter.portal_plans.plan_rate_limit_rps. +type RowFilterPortalPlansPlanRateLimitRps = string + +// RowFilterPortalPlansPlanUsageLimit defines model for rowFilter.portal_plans.plan_usage_limit. +type RowFilterPortalPlansPlanUsageLimit = string + +// RowFilterPortalPlansPlanUsageLimitInterval defines model for rowFilter.portal_plans.plan_usage_limit_interval. +type RowFilterPortalPlansPlanUsageLimitInterval = string + +// RowFilterPortalPlansPortalPlanType defines model for rowFilter.portal_plans.portal_plan_type. +type RowFilterPortalPlansPortalPlanType = string + +// RowFilterPortalPlansPortalPlanTypeDescription defines model for rowFilter.portal_plans.portal_plan_type_description. +type RowFilterPortalPlansPortalPlanTypeDescription = string + +// RowFilterPortalUsersCreatedAt defines model for rowFilter.portal_users.created_at. +type RowFilterPortalUsersCreatedAt = string + +// RowFilterPortalUsersDeletedAt defines model for rowFilter.portal_users.deleted_at. +type RowFilterPortalUsersDeletedAt = string + +// RowFilterPortalUsersPortalAdmin defines model for rowFilter.portal_users.portal_admin. +type RowFilterPortalUsersPortalAdmin = string + +// RowFilterPortalUsersPortalUserEmail defines model for rowFilter.portal_users.portal_user_email. +type RowFilterPortalUsersPortalUserEmail = string + +// RowFilterPortalUsersPortalUserId defines model for rowFilter.portal_users.portal_user_id. +type RowFilterPortalUsersPortalUserId = string + +// RowFilterPortalUsersSignedUp defines model for rowFilter.portal_users.signed_up. +type RowFilterPortalUsersSignedUp = string + +// RowFilterPortalUsersUpdatedAt defines model for rowFilter.portal_users.updated_at. +type RowFilterPortalUsersUpdatedAt = string + +// RowFilterPortalWorkersAccountDataBillingType defines model for rowFilter.portal_workers_account_data.billing_type. +type RowFilterPortalWorkersAccountDataBillingType = string + +// RowFilterPortalWorkersAccountDataGcpEntitlementId defines model for rowFilter.portal_workers_account_data.gcp_entitlement_id. +type RowFilterPortalWorkersAccountDataGcpEntitlementId = string + +// RowFilterPortalWorkersAccountDataOwnerEmail defines model for rowFilter.portal_workers_account_data.owner_email. +type RowFilterPortalWorkersAccountDataOwnerEmail = string + +// RowFilterPortalWorkersAccountDataOwnerUserId defines model for rowFilter.portal_workers_account_data.owner_user_id. +type RowFilterPortalWorkersAccountDataOwnerUserId = string + +// RowFilterPortalWorkersAccountDataPortalAccountId defines model for rowFilter.portal_workers_account_data.portal_account_id. +type RowFilterPortalWorkersAccountDataPortalAccountId = string + +// RowFilterPortalWorkersAccountDataPortalAccountUserLimit defines model for rowFilter.portal_workers_account_data.portal_account_user_limit. +type RowFilterPortalWorkersAccountDataPortalAccountUserLimit = string + +// RowFilterPortalWorkersAccountDataPortalPlanType defines model for rowFilter.portal_workers_account_data.portal_plan_type. +type RowFilterPortalWorkersAccountDataPortalPlanType = string + +// RowFilterPortalWorkersAccountDataUserAccountName defines model for rowFilter.portal_workers_account_data.user_account_name. +type RowFilterPortalWorkersAccountDataUserAccountName = string + +// RowFilterServiceEndpointsCreatedAt defines model for rowFilter.service_endpoints.created_at. +type RowFilterServiceEndpointsCreatedAt = string + +// RowFilterServiceEndpointsEndpointId defines model for rowFilter.service_endpoints.endpoint_id. +type RowFilterServiceEndpointsEndpointId = string + +// RowFilterServiceEndpointsEndpointType defines model for rowFilter.service_endpoints.endpoint_type. +type RowFilterServiceEndpointsEndpointType = string + +// RowFilterServiceEndpointsServiceId defines model for rowFilter.service_endpoints.service_id. +type RowFilterServiceEndpointsServiceId = string + +// RowFilterServiceEndpointsUpdatedAt defines model for rowFilter.service_endpoints.updated_at. +type RowFilterServiceEndpointsUpdatedAt = string + +// RowFilterServiceFallbacksCreatedAt defines model for rowFilter.service_fallbacks.created_at. +type RowFilterServiceFallbacksCreatedAt = string + +// RowFilterServiceFallbacksFallbackUrl defines model for rowFilter.service_fallbacks.fallback_url. +type RowFilterServiceFallbacksFallbackUrl = string + +// RowFilterServiceFallbacksServiceFallbackId defines model for rowFilter.service_fallbacks.service_fallback_id. +type RowFilterServiceFallbacksServiceFallbackId = string + +// RowFilterServiceFallbacksServiceId defines model for rowFilter.service_fallbacks.service_id. +type RowFilterServiceFallbacksServiceId = string + +// RowFilterServiceFallbacksUpdatedAt defines model for rowFilter.service_fallbacks.updated_at. +type RowFilterServiceFallbacksUpdatedAt = string + +// RowFilterServicesActive defines model for rowFilter.services.active. +type RowFilterServicesActive = string + +// RowFilterServicesBeta defines model for rowFilter.services.beta. +type RowFilterServicesBeta = string + +// RowFilterServicesComingSoon defines model for rowFilter.services.coming_soon. +type RowFilterServicesComingSoon = string + +// RowFilterServicesComputeUnitsPerRelay defines model for rowFilter.services.compute_units_per_relay. +type RowFilterServicesComputeUnitsPerRelay = string + +// RowFilterServicesCreatedAt defines model for rowFilter.services.created_at. +type RowFilterServicesCreatedAt = string + +// RowFilterServicesDeletedAt defines model for rowFilter.services.deleted_at. +type RowFilterServicesDeletedAt = string + +// RowFilterServicesHardFallbackEnabled defines model for rowFilter.services.hard_fallback_enabled. +type RowFilterServicesHardFallbackEnabled = string + +// RowFilterServicesNetworkId defines model for rowFilter.services.network_id. +type RowFilterServicesNetworkId = string + +// RowFilterServicesPublicEndpointUrl defines model for rowFilter.services.public_endpoint_url. +type RowFilterServicesPublicEndpointUrl = string + +// RowFilterServicesQualityFallbackEnabled defines model for rowFilter.services.quality_fallback_enabled. +type RowFilterServicesQualityFallbackEnabled = string + +// RowFilterServicesServiceDomains defines model for rowFilter.services.service_domains. +type RowFilterServicesServiceDomains = string + +// RowFilterServicesServiceId defines model for rowFilter.services.service_id. +type RowFilterServicesServiceId = string + +// RowFilterServicesServiceName defines model for rowFilter.services.service_name. +type RowFilterServicesServiceName = string + +// RowFilterServicesServiceOwnerAddress defines model for rowFilter.services.service_owner_address. +type RowFilterServicesServiceOwnerAddress = string + +// RowFilterServicesStatusEndpointUrl defines model for rowFilter.services.status_endpoint_url. +type RowFilterServicesStatusEndpointUrl = string + +// RowFilterServicesStatusQuery defines model for rowFilter.services.status_query. +type RowFilterServicesStatusQuery = string + +// RowFilterServicesSvgIcon defines model for rowFilter.services.svg_icon. +type RowFilterServicesSvgIcon = string + +// RowFilterServicesUpdatedAt defines model for rowFilter.services.updated_at. +type RowFilterServicesUpdatedAt = string + +// Select defines model for select. +type Select = string + +// Args defines model for Args. +type Args struct { + Empty string `json:""` +} + +// Args2 defines model for Args2. +type Args2 struct { + Empty string `json:""` +} + +// DeleteNetworksParams defines parameters for DeleteNetworks. +type DeleteNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *DeleteNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteNetworksParamsPrefer defines parameters for DeleteNetworks. +type DeleteNetworksParamsPrefer string + +// GetNetworksParams defines parameters for GetNetworks. +type GetNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetNetworksParamsPrefer defines parameters for GetNetworks. +type GetNetworksParamsPrefer string + +// PatchNetworksParams defines parameters for PatchNetworks. +type PatchNetworksParams struct { + NetworkId *RowFilterNetworksNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + + // Prefer Preference + Prefer *PatchNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchNetworksParamsPrefer defines parameters for PatchNetworks. +type PatchNetworksParamsPrefer string + +// PostNetworksParams defines parameters for PostNetworks. +type PostNetworksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostNetworksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostNetworksParamsPrefer defines parameters for PostNetworks. +type PostNetworksParamsPrefer string + +// DeleteOrganizationsParams defines parameters for DeleteOrganizations. +type DeleteOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteOrganizationsParamsPrefer defines parameters for DeleteOrganizations. +type DeleteOrganizationsParamsPrefer string + +// GetOrganizationsParams defines parameters for GetOrganizations. +type GetOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetOrganizationsParamsPrefer defines parameters for GetOrganizations. +type GetOrganizationsParamsPrefer string + +// PatchOrganizationsParams defines parameters for PatchOrganizations. +type PatchOrganizationsParams struct { + OrganizationId *RowFilterOrganizationsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + + // OrganizationName Name of the organization + OrganizationName *RowFilterOrganizationsOrganizationName `form:"organization_name,omitempty" json:"organization_name,omitempty"` + + // DeletedAt Soft delete timestamp + DeletedAt *RowFilterOrganizationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterOrganizationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterOrganizationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchOrganizationsParamsPrefer defines parameters for PatchOrganizations. +type PatchOrganizationsParamsPrefer string + +// PostOrganizationsParams defines parameters for PostOrganizations. +type PostOrganizationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostOrganizationsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostOrganizationsParamsPrefer defines parameters for PostOrganizations. +type PostOrganizationsParamsPrefer string + +// DeletePortalAccountRbacParams defines parameters for DeletePortalAccountRbac. +type DeletePortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountRbacParamsPrefer defines parameters for DeletePortalAccountRbac. +type DeletePortalAccountRbacParamsPrefer string + +// GetPortalAccountRbacParams defines parameters for GetPortalAccountRbac. +type GetPortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountRbacParamsPrefer defines parameters for GetPortalAccountRbac. +type GetPortalAccountRbacParamsPrefer string + +// PatchPortalAccountRbacParams defines parameters for PatchPortalAccountRbac. +type PatchPortalAccountRbacParams struct { + Id *RowFilterPortalAccountRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalAccountId *RowFilterPortalAccountRbacPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalUserId *RowFilterPortalAccountRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + RoleName *RowFilterPortalAccountRbacRoleName `form:"role_name,omitempty" json:"role_name,omitempty"` + UserJoinedAccount *RowFilterPortalAccountRbacUserJoinedAccount `form:"user_joined_account,omitempty" json:"user_joined_account,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountRbacParamsPrefer defines parameters for PatchPortalAccountRbac. +type PatchPortalAccountRbacParamsPrefer string + +// PostPortalAccountRbacParams defines parameters for PostPortalAccountRbac. +type PostPortalAccountRbacParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountRbacParamsPrefer defines parameters for PostPortalAccountRbac. +type PostPortalAccountRbacParamsPrefer string + +// DeletePortalAccountsParams defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalAccountsParamsPrefer defines parameters for DeletePortalAccounts. +type DeletePortalAccountsParamsPrefer string + +// GetPortalAccountsParams defines parameters for GetPortalAccounts. +type GetPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalAccountsParamsPrefer defines parameters for GetPortalAccounts. +type GetPortalAccountsParamsPrefer string + +// PatchPortalAccountsParams defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParams struct { + // PortalAccountId Unique identifier for the portal account + PortalAccountId *RowFilterPortalAccountsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + OrganizationId *RowFilterPortalAccountsOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` + PortalPlanType *RowFilterPortalAccountsPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + UserAccountName *RowFilterPortalAccountsUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + InternalAccountName *RowFilterPortalAccountsInternalAccountName `form:"internal_account_name,omitempty" json:"internal_account_name,omitempty"` + PortalAccountUserLimit *RowFilterPortalAccountsPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + PortalAccountUserLimitInterval *RowFilterPortalAccountsPortalAccountUserLimitInterval `form:"portal_account_user_limit_interval,omitempty" json:"portal_account_user_limit_interval,omitempty"` + PortalAccountUserLimitRps *RowFilterPortalAccountsPortalAccountUserLimitRps `form:"portal_account_user_limit_rps,omitempty" json:"portal_account_user_limit_rps,omitempty"` + BillingType *RowFilterPortalAccountsBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + + // StripeSubscriptionId Stripe subscription identifier for billing + StripeSubscriptionId *RowFilterPortalAccountsStripeSubscriptionId `form:"stripe_subscription_id,omitempty" json:"stripe_subscription_id,omitempty"` + GcpAccountId *RowFilterPortalAccountsGcpAccountId `form:"gcp_account_id,omitempty" json:"gcp_account_id,omitempty"` + GcpEntitlementId *RowFilterPortalAccountsGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + DeletedAt *RowFilterPortalAccountsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalAccountsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalAccountsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalAccountsParamsPrefer defines parameters for PatchPortalAccounts. +type PatchPortalAccountsParamsPrefer string + +// PostPortalAccountsParams defines parameters for PostPortalAccounts. +type PostPortalAccountsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalAccountsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalAccountsParamsPrefer defines parameters for PostPortalAccounts. +type PostPortalAccountsParamsPrefer string + +// DeletePortalApplicationRbacParams defines parameters for DeletePortalApplicationRbac. +type DeletePortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationRbacParamsPrefer defines parameters for DeletePortalApplicationRbac. +type DeletePortalApplicationRbacParamsPrefer string + +// GetPortalApplicationRbacParams defines parameters for GetPortalApplicationRbac. +type GetPortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationRbacParamsPrefer defines parameters for GetPortalApplicationRbac. +type GetPortalApplicationRbacParamsPrefer string + +// PatchPortalApplicationRbacParams defines parameters for PatchPortalApplicationRbac. +type PatchPortalApplicationRbacParams struct { + Id *RowFilterPortalApplicationRbacId `form:"id,omitempty" json:"id,omitempty"` + PortalApplicationId *RowFilterPortalApplicationRbacPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalUserId *RowFilterPortalApplicationRbacPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + CreatedAt *RowFilterPortalApplicationRbacCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationRbacUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalApplicationRbacParamsPrefer defines parameters for PatchPortalApplicationRbac. +type PatchPortalApplicationRbacParamsPrefer string + +// PostPortalApplicationRbacParams defines parameters for PostPortalApplicationRbac. +type PostPortalApplicationRbacParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalApplicationRbacParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalApplicationRbacParamsPrefer defines parameters for PostPortalApplicationRbac. +type PostPortalApplicationRbacParamsPrefer string + +// DeletePortalApplicationsParams defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalApplicationsParamsPrefer defines parameters for DeletePortalApplications. +type DeletePortalApplicationsParamsPrefer string + +// GetPortalApplicationsParams defines parameters for GetPortalApplications. +type GetPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalApplicationsParamsPrefer defines parameters for GetPortalApplications. +type GetPortalApplicationsParamsPrefer string + +// PatchPortalApplicationsParams defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParams struct { + PortalApplicationId *RowFilterPortalApplicationsPortalApplicationId `form:"portal_application_id,omitempty" json:"portal_application_id,omitempty"` + PortalAccountId *RowFilterPortalApplicationsPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + PortalApplicationName *RowFilterPortalApplicationsPortalApplicationName `form:"portal_application_name,omitempty" json:"portal_application_name,omitempty"` + Emoji *RowFilterPortalApplicationsEmoji `form:"emoji,omitempty" json:"emoji,omitempty"` + PortalApplicationUserLimit *RowFilterPortalApplicationsPortalApplicationUserLimit `form:"portal_application_user_limit,omitempty" json:"portal_application_user_limit,omitempty"` + PortalApplicationUserLimitInterval *RowFilterPortalApplicationsPortalApplicationUserLimitInterval `form:"portal_application_user_limit_interval,omitempty" json:"portal_application_user_limit_interval,omitempty"` + PortalApplicationUserLimitRps *RowFilterPortalApplicationsPortalApplicationUserLimitRps `form:"portal_application_user_limit_rps,omitempty" json:"portal_application_user_limit_rps,omitempty"` + PortalApplicationDescription *RowFilterPortalApplicationsPortalApplicationDescription `form:"portal_application_description,omitempty" json:"portal_application_description,omitempty"` + FavoriteServiceIds *RowFilterPortalApplicationsFavoriteServiceIds `form:"favorite_service_ids,omitempty" json:"favorite_service_ids,omitempty"` + + // SecretKeyHash Hashed secret key for application authentication + SecretKeyHash *RowFilterPortalApplicationsSecretKeyHash `form:"secret_key_hash,omitempty" json:"secret_key_hash,omitempty"` + SecretKeyRequired *RowFilterPortalApplicationsSecretKeyRequired `form:"secret_key_required,omitempty" json:"secret_key_required,omitempty"` + DeletedAt *RowFilterPortalApplicationsDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalApplicationsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalApplicationsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` -// Defines values for PostRpcDearmorParamsPrefer. -const ( - PostRpcDearmorParamsPreferParamsSingleObject PostRpcDearmorParamsPrefer = "params=single-object" -) + // Prefer Preference + Prefer *PatchPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} -// Defines values for PostRpcGenRandomUuidParamsPrefer. -const ( - PostRpcGenRandomUuidParamsPreferParamsSingleObject PostRpcGenRandomUuidParamsPrefer = "params=single-object" -) +// PatchPortalApplicationsParamsPrefer defines parameters for PatchPortalApplications. +type PatchPortalApplicationsParamsPrefer string -// Defines values for PostRpcGenSaltParamsPrefer. -const ( - PostRpcGenSaltParamsPreferParamsSingleObject PostRpcGenSaltParamsPrefer = "params=single-object" -) +// PostPortalApplicationsParams defines parameters for PostPortalApplications. +type PostPortalApplicationsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` -// Defines values for PostRpcPgpArmorHeadersParamsPrefer. -const ( - PostRpcPgpArmorHeadersParamsPreferParamsSingleObject PostRpcPgpArmorHeadersParamsPrefer = "params=single-object" -) + // Prefer Preference + Prefer *PostPortalApplicationsParamsPrefer `json:"Prefer,omitempty"` +} -// Defines values for PostRpcPgpKeyIdParamsPrefer. -const ( - ParamsSingleObject PostRpcPgpKeyIdParamsPrefer = "params=single-object" -) +// PostPortalApplicationsParamsPrefer defines parameters for PostPortalApplications. +type PostPortalApplicationsParamsPrefer string -// PreferParams defines model for preferParams. -type PreferParams string +// DeletePortalPlansParams defines parameters for DeletePortalPlans. +type DeletePortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` -// Args defines model for Args. -type Args struct { - Empty string `json:""` + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *DeletePortalPlansParamsPrefer `json:"Prefer,omitempty"` } -// Args2 defines model for Args2. -type Args2 struct { - Empty string `json:""` +// DeletePortalPlansParamsPrefer defines parameters for DeletePortalPlans. +type DeletePortalPlansParamsPrefer string + +// GetPortalPlansParams defines parameters for GetPortalPlans. +type GetPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalPlansParamsPrefer defines parameters for GetPortalPlans. +type GetPortalPlansParamsPrefer string + +// PatchPortalPlansParams defines parameters for PatchPortalPlans. +type PatchPortalPlansParams struct { + PortalPlanType *RowFilterPortalPlansPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + PortalPlanTypeDescription *RowFilterPortalPlansPortalPlanTypeDescription `form:"portal_plan_type_description,omitempty" json:"portal_plan_type_description,omitempty"` + + // PlanUsageLimit Maximum usage allowed within the interval + PlanUsageLimit *RowFilterPortalPlansPlanUsageLimit `form:"plan_usage_limit,omitempty" json:"plan_usage_limit,omitempty"` + PlanUsageLimitInterval *RowFilterPortalPlansPlanUsageLimitInterval `form:"plan_usage_limit_interval,omitempty" json:"plan_usage_limit_interval,omitempty"` + + // PlanRateLimitRps Rate limit in requests per second + PlanRateLimitRps *RowFilterPortalPlansPlanRateLimitRps `form:"plan_rate_limit_rps,omitempty" json:"plan_rate_limit_rps,omitempty"` + PlanApplicationLimit *RowFilterPortalPlansPlanApplicationLimit `form:"plan_application_limit,omitempty" json:"plan_application_limit,omitempty"` + + // Prefer Preference + Prefer *PatchPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalPlansParamsPrefer defines parameters for PatchPortalPlans. +type PatchPortalPlansParamsPrefer string + +// PostPortalPlansParams defines parameters for PostPortalPlans. +type PostPortalPlansParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalPlansParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalPlansParamsPrefer defines parameters for PostPortalPlans. +type PostPortalPlansParamsPrefer string + +// DeletePortalUsersParams defines parameters for DeletePortalUsers. +type DeletePortalUsersParams struct { + PortalUserId *RowFilterPortalUsersPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + + // PortalUserEmail Unique email address for the user + PortalUserEmail *RowFilterPortalUsersPortalUserEmail `form:"portal_user_email,omitempty" json:"portal_user_email,omitempty"` + SignedUp *RowFilterPortalUsersSignedUp `form:"signed_up,omitempty" json:"signed_up,omitempty"` + + // PortalAdmin Whether user has admin privileges across the portal + PortalAdmin *RowFilterPortalUsersPortalAdmin `form:"portal_admin,omitempty" json:"portal_admin,omitempty"` + DeletedAt *RowFilterPortalUsersDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalUsersCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalUsersUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeletePortalUsersParamsPrefer `json:"Prefer,omitempty"` +} + +// DeletePortalUsersParamsPrefer defines parameters for DeletePortalUsers. +type DeletePortalUsersParamsPrefer string + +// GetPortalUsersParams defines parameters for GetPortalUsers. +type GetPortalUsersParams struct { + PortalUserId *RowFilterPortalUsersPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + + // PortalUserEmail Unique email address for the user + PortalUserEmail *RowFilterPortalUsersPortalUserEmail `form:"portal_user_email,omitempty" json:"portal_user_email,omitempty"` + SignedUp *RowFilterPortalUsersSignedUp `form:"signed_up,omitempty" json:"signed_up,omitempty"` + + // PortalAdmin Whether user has admin privileges across the portal + PortalAdmin *RowFilterPortalUsersPortalAdmin `form:"portal_admin,omitempty" json:"portal_admin,omitempty"` + DeletedAt *RowFilterPortalUsersDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalUsersCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalUsersUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalUsersParamsPrefer `json:"Prefer,omitempty"` +} + +// GetPortalUsersParamsPrefer defines parameters for GetPortalUsers. +type GetPortalUsersParamsPrefer string + +// PatchPortalUsersParams defines parameters for PatchPortalUsers. +type PatchPortalUsersParams struct { + PortalUserId *RowFilterPortalUsersPortalUserId `form:"portal_user_id,omitempty" json:"portal_user_id,omitempty"` + + // PortalUserEmail Unique email address for the user + PortalUserEmail *RowFilterPortalUsersPortalUserEmail `form:"portal_user_email,omitempty" json:"portal_user_email,omitempty"` + SignedUp *RowFilterPortalUsersSignedUp `form:"signed_up,omitempty" json:"signed_up,omitempty"` + + // PortalAdmin Whether user has admin privileges across the portal + PortalAdmin *RowFilterPortalUsersPortalAdmin `form:"portal_admin,omitempty" json:"portal_admin,omitempty"` + DeletedAt *RowFilterPortalUsersDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterPortalUsersCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterPortalUsersUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchPortalUsersParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchPortalUsersParamsPrefer defines parameters for PatchPortalUsers. +type PatchPortalUsersParamsPrefer string + +// PostPortalUsersParams defines parameters for PostPortalUsers. +type PostPortalUsersParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostPortalUsersParamsPrefer `json:"Prefer,omitempty"` +} + +// PostPortalUsersParamsPrefer defines parameters for PostPortalUsers. +type PostPortalUsersParamsPrefer string + +// GetPortalWorkersAccountDataParams defines parameters for GetPortalWorkersAccountData. +type GetPortalWorkersAccountDataParams struct { + PortalAccountId *RowFilterPortalWorkersAccountDataPortalAccountId `form:"portal_account_id,omitempty" json:"portal_account_id,omitempty"` + UserAccountName *RowFilterPortalWorkersAccountDataUserAccountName `form:"user_account_name,omitempty" json:"user_account_name,omitempty"` + PortalPlanType *RowFilterPortalWorkersAccountDataPortalPlanType `form:"portal_plan_type,omitempty" json:"portal_plan_type,omitempty"` + BillingType *RowFilterPortalWorkersAccountDataBillingType `form:"billing_type,omitempty" json:"billing_type,omitempty"` + PortalAccountUserLimit *RowFilterPortalWorkersAccountDataPortalAccountUserLimit `form:"portal_account_user_limit,omitempty" json:"portal_account_user_limit,omitempty"` + GcpEntitlementId *RowFilterPortalWorkersAccountDataGcpEntitlementId `form:"gcp_entitlement_id,omitempty" json:"gcp_entitlement_id,omitempty"` + OwnerEmail *RowFilterPortalWorkersAccountDataOwnerEmail `form:"owner_email,omitempty" json:"owner_email,omitempty"` + OwnerUserId *RowFilterPortalWorkersAccountDataOwnerUserId `form:"owner_user_id,omitempty" json:"owner_user_id,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetPortalWorkersAccountDataParamsPrefer `json:"Prefer,omitempty"` } +// GetPortalWorkersAccountDataParamsPrefer defines parameters for GetPortalWorkersAccountData. +type GetPortalWorkersAccountDataParamsPrefer string + // GetRpcArmorParams defines parameters for GetRpcArmor. type GetRpcArmorParams struct { Empty string `form:"" json:""` @@ -214,6 +1875,426 @@ type PostRpcPgpKeyIdParams struct { // PostRpcPgpKeyIdParamsPrefer defines parameters for PostRpcPgpKeyId. type PostRpcPgpKeyIdParamsPrefer string +// DeleteServiceEndpointsParams defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceEndpointsParamsPrefer defines parameters for DeleteServiceEndpoints. +type DeleteServiceEndpointsParamsPrefer string + +// GetServiceEndpointsParams defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceEndpointsParamsPrefer defines parameters for GetServiceEndpoints. +type GetServiceEndpointsParamsPrefer string + +// PatchServiceEndpointsParams defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParams struct { + EndpointId *RowFilterServiceEndpointsEndpointId `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + ServiceId *RowFilterServiceEndpointsServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + EndpointType *RowFilterServiceEndpointsEndpointType `form:"endpoint_type,omitempty" json:"endpoint_type,omitempty"` + CreatedAt *RowFilterServiceEndpointsCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceEndpointsUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceEndpointsParamsPrefer defines parameters for PatchServiceEndpoints. +type PatchServiceEndpointsParamsPrefer string + +// PostServiceEndpointsParams defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceEndpointsParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceEndpointsParamsPrefer defines parameters for PostServiceEndpoints. +type PostServiceEndpointsParamsPrefer string + +// DeleteServiceFallbacksParams defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServiceFallbacksParamsPrefer defines parameters for DeleteServiceFallbacks. +type DeleteServiceFallbacksParamsPrefer string + +// GetServiceFallbacksParams defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServiceFallbacksParamsPrefer defines parameters for GetServiceFallbacks. +type GetServiceFallbacksParamsPrefer string + +// PatchServiceFallbacksParams defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParams struct { + ServiceFallbackId *RowFilterServiceFallbacksServiceFallbackId `form:"service_fallback_id,omitempty" json:"service_fallback_id,omitempty"` + ServiceId *RowFilterServiceFallbacksServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + FallbackUrl *RowFilterServiceFallbacksFallbackUrl `form:"fallback_url,omitempty" json:"fallback_url,omitempty"` + CreatedAt *RowFilterServiceFallbacksCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServiceFallbacksUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServiceFallbacksParamsPrefer defines parameters for PatchServiceFallbacks. +type PatchServiceFallbacksParamsPrefer string + +// PostServiceFallbacksParams defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServiceFallbacksParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServiceFallbacksParamsPrefer defines parameters for PostServiceFallbacks. +type PostServiceFallbacksParamsPrefer string + +// DeleteServicesParams defines parameters for DeleteServices. +type DeleteServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *DeleteServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// DeleteServicesParamsPrefer defines parameters for DeleteServices. +type DeleteServicesParamsPrefer string + +// GetServicesParams defines parameters for GetServices. +type GetServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Order Ordering + Order *Order `form:"order,omitempty" json:"order,omitempty"` + + // Offset Limiting and Pagination + Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Limiting and Pagination + Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` + + // Range Limiting and Pagination + Range *Range `json:"Range,omitempty"` + + // RangeUnit Limiting and Pagination + RangeUnit *RangeUnit `json:"Range-Unit,omitempty"` + + // Prefer Preference + Prefer *GetServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// GetServicesParamsPrefer defines parameters for GetServices. +type GetServicesParamsPrefer string + +// PatchServicesParams defines parameters for PatchServices. +type PatchServicesParams struct { + ServiceId *RowFilterServicesServiceId `form:"service_id,omitempty" json:"service_id,omitempty"` + ServiceName *RowFilterServicesServiceName `form:"service_name,omitempty" json:"service_name,omitempty"` + + // ComputeUnitsPerRelay Cost in compute units for each relay + ComputeUnitsPerRelay *RowFilterServicesComputeUnitsPerRelay `form:"compute_units_per_relay,omitempty" json:"compute_units_per_relay,omitempty"` + + // ServiceDomains Valid domains for this service + ServiceDomains *RowFilterServicesServiceDomains `form:"service_domains,omitempty" json:"service_domains,omitempty"` + ServiceOwnerAddress *RowFilterServicesServiceOwnerAddress `form:"service_owner_address,omitempty" json:"service_owner_address,omitempty"` + NetworkId *RowFilterServicesNetworkId `form:"network_id,omitempty" json:"network_id,omitempty"` + Active *RowFilterServicesActive `form:"active,omitempty" json:"active,omitempty"` + Beta *RowFilterServicesBeta `form:"beta,omitempty" json:"beta,omitempty"` + ComingSoon *RowFilterServicesComingSoon `form:"coming_soon,omitempty" json:"coming_soon,omitempty"` + QualityFallbackEnabled *RowFilterServicesQualityFallbackEnabled `form:"quality_fallback_enabled,omitempty" json:"quality_fallback_enabled,omitempty"` + HardFallbackEnabled *RowFilterServicesHardFallbackEnabled `form:"hard_fallback_enabled,omitempty" json:"hard_fallback_enabled,omitempty"` + SvgIcon *RowFilterServicesSvgIcon `form:"svg_icon,omitempty" json:"svg_icon,omitempty"` + PublicEndpointUrl *RowFilterServicesPublicEndpointUrl `form:"public_endpoint_url,omitempty" json:"public_endpoint_url,omitempty"` + StatusEndpointUrl *RowFilterServicesStatusEndpointUrl `form:"status_endpoint_url,omitempty" json:"status_endpoint_url,omitempty"` + StatusQuery *RowFilterServicesStatusQuery `form:"status_query,omitempty" json:"status_query,omitempty"` + DeletedAt *RowFilterServicesDeletedAt `form:"deleted_at,omitempty" json:"deleted_at,omitempty"` + CreatedAt *RowFilterServicesCreatedAt `form:"created_at,omitempty" json:"created_at,omitempty"` + UpdatedAt *RowFilterServicesUpdatedAt `form:"updated_at,omitempty" json:"updated_at,omitempty"` + + // Prefer Preference + Prefer *PatchServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PatchServicesParamsPrefer defines parameters for PatchServices. +type PatchServicesParamsPrefer string + +// PostServicesParams defines parameters for PostServices. +type PostServicesParams struct { + // Select Filtering Columns + Select *Select `form:"select,omitempty" json:"select,omitempty"` + + // Prefer Preference + Prefer *PostServicesParamsPrefer `json:"Prefer,omitempty"` +} + +// PostServicesParamsPrefer defines parameters for PostServices. +type PostServicesParamsPrefer string + +// PatchNetworksJSONRequestBody defines body for PatchNetworks for application/json ContentType. +type PatchNetworksJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PostNetworksJSONRequestBody defines body for PostNetworks for application/json ContentType. +type PostNetworksJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONRequestBody = Networks + +// PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostNetworks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostNetworksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Networks + +// PatchOrganizationsJSONRequestBody defines body for PatchOrganizations for application/json ContentType. +type PatchOrganizationsJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType. +type PostOrganizationsJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONRequestBody = Organizations + +// PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostOrganizations for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostOrganizationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Organizations + +// PatchPortalAccountRbacJSONRequestBody defines body for PatchPortalAccountRbac for application/json ContentType. +type PatchPortalAccountRbacJSONRequestBody = PortalAccountRbac + +// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac + +// PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac + +// PostPortalAccountRbacJSONRequestBody defines body for PostPortalAccountRbac for application/json ContentType. +type PostPortalAccountRbacJSONRequestBody = PortalAccountRbac + +// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccountRbac + +// PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccountRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccountRbac + +// PatchPortalAccountsJSONRequestBody defines body for PatchPortalAccounts for application/json ContentType. +type PatchPortalAccountsJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PostPortalAccountsJSONRequestBody defines body for PostPortalAccounts for application/json ContentType. +type PostPortalAccountsJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONRequestBody = PortalAccounts + +// PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalAccounts for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalAccountsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalAccounts + +// PatchPortalApplicationRbacJSONRequestBody defines body for PatchPortalApplicationRbac for application/json ContentType. +type PatchPortalApplicationRbacJSONRequestBody = PortalApplicationRbac + +// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac + +// PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacJSONRequestBody defines body for PostPortalApplicationRbac for application/json ContentType. +type PostPortalApplicationRbacJSONRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplicationRbac + +// PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplicationRbac for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationRbacApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplicationRbac + +// PatchPortalApplicationsJSONRequestBody defines body for PatchPortalApplications for application/json ContentType. +type PatchPortalApplicationsJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PostPortalApplicationsJSONRequestBody defines body for PostPortalApplications for application/json ContentType. +type PostPortalApplicationsJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONRequestBody = PortalApplications + +// PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalApplications for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalApplicationsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalApplications + +// PatchPortalPlansJSONRequestBody defines body for PatchPortalPlans for application/json ContentType. +type PatchPortalPlansJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PostPortalPlansJSONRequestBody defines body for PostPortalPlans for application/json ContentType. +type PostPortalPlansJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONRequestBody = PortalPlans + +// PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalPlans for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalPlansApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalPlans + +// PatchPortalUsersJSONRequestBody defines body for PatchPortalUsers for application/json ContentType. +type PatchPortalUsersJSONRequestBody = PortalUsers + +// PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchPortalUsers for application/vnd.pgrst.object+json ContentType. +type PatchPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody = PortalUsers + +// PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchPortalUsers for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalUsers + +// PostPortalUsersJSONRequestBody defines body for PostPortalUsers for application/json ContentType. +type PostPortalUsersJSONRequestBody = PortalUsers + +// PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostPortalUsers for application/vnd.pgrst.object+json ContentType. +type PostPortalUsersApplicationVndPgrstObjectPlusJSONRequestBody = PortalUsers + +// PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostPortalUsers for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostPortalUsersApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = PortalUsers + // PostRpcArmorJSONRequestBody defines body for PostRpcArmor for application/json ContentType. type PostRpcArmorJSONRequestBody PostRpcArmorJSONBody @@ -267,3 +2348,57 @@ type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONRequestBody PostRpcPgpKeyId // PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostRpcPgpKeyId for application/vnd.pgrst.object+json;nulls=stripped ContentType. type PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody PostRpcPgpKeyIdApplicationVndPgrstObjectPlusJSONNullsStrippedBody + +// PatchServiceEndpointsJSONRequestBody defines body for PatchServiceEndpoints for application/json ContentType. +type PatchServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PostServiceEndpointsJSONRequestBody defines body for PostServiceEndpoints for application/json ContentType. +type PostServiceEndpointsJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONRequestBody = ServiceEndpoints + +// PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceEndpoints for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceEndpointsApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceEndpoints + +// PatchServiceFallbacksJSONRequestBody defines body for PatchServiceFallbacks for application/json ContentType. +type PatchServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PostServiceFallbacksJSONRequestBody defines body for PostServiceFallbacks for application/json ContentType. +type PostServiceFallbacksJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONRequestBody = ServiceFallbacks + +// PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServiceFallbacks for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServiceFallbacksApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = ServiceFallbacks + +// PatchServicesJSONRequestBody defines body for PatchServices for application/json ContentType. +type PatchServicesJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PatchServices for application/vnd.pgrst.object+json ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PatchServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PatchServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services + +// PostServicesJSONRequestBody defines body for PostServices for application/json ContentType. +type PostServicesJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONRequestBody defines body for PostServices for application/vnd.pgrst.object+json ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONRequestBody = Services + +// PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody defines body for PostServices for application/vnd.pgrst.object+json;nulls=stripped ContentType. +type PostServicesApplicationVndPgrstObjectPlusJSONNullsStrippedRequestBody = Services diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES index 52ac2bbbf..4bdf57113 100644 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ b/portal-db/sdk/typescript/.openapi-generator/FILES @@ -3,16 +3,40 @@ README.md package.json src/apis/IntrospectionApi.ts +src/apis/NetworksApi.ts +src/apis/OrganizationsApi.ts +src/apis/PortalAccountRbacApi.ts +src/apis/PortalAccountsApi.ts +src/apis/PortalApplicationRbacApi.ts +src/apis/PortalApplicationsApi.ts +src/apis/PortalPlansApi.ts +src/apis/PortalUsersApi.ts +src/apis/PortalWorkersAccountDataApi.ts src/apis/RpcArmorApi.ts src/apis/RpcDearmorApi.ts src/apis/RpcGenRandomUuidApi.ts src/apis/RpcGenSaltApi.ts src/apis/RpcPgpArmorHeadersApi.ts src/apis/RpcPgpKeyIdApi.ts +src/apis/ServiceEndpointsApi.ts +src/apis/ServiceFallbacksApi.ts +src/apis/ServicesApi.ts src/apis/index.ts src/index.ts +src/models/Networks.ts +src/models/Organizations.ts +src/models/PortalAccountRbac.ts +src/models/PortalAccounts.ts +src/models/PortalApplicationRbac.ts +src/models/PortalApplications.ts +src/models/PortalPlans.ts +src/models/PortalUsers.ts +src/models/PortalWorkersAccountData.ts src/models/RpcArmorPostRequest.ts src/models/RpcGenSaltPostRequest.ts +src/models/ServiceEndpoints.ts +src/models/ServiceFallbacks.ts +src/models/Services.ts src/models/index.ts src/runtime.ts tsconfig.json diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts new file mode 100644 index 000000000..7ed2eea64 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/NetworksApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Networks, +} from '../models/index'; +import { + NetworksFromJSON, + NetworksToJSON, +} from '../models/index'; + +export interface NetworksDeleteRequest { + networkId?: string; + prefer?: NetworksDeletePreferEnum; +} + +export interface NetworksGetRequest { + networkId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: NetworksGetPreferEnum; +} + +export interface NetworksPatchRequest { + networkId?: string; + prefer?: NetworksPatchPreferEnum; + networks?: Networks; +} + +export interface NetworksPostRequest { + select?: string; + prefer?: NetworksPostPreferEnum; + networks?: Networks; +} + +/** + * + */ +export class NetworksApi extends runtime.BaseAPI { + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.networksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/networks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworksToJSON(requestParameters['networks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + */ + async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const NetworksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; +/** + * @export + */ +export const NetworksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; +/** + * @export + */ +export const NetworksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; +/** + * @export + */ +export const NetworksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts new file mode 100644 index 000000000..9944fa2cd --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Organizations, +} from '../models/index'; +import { + OrganizationsFromJSON, + OrganizationsToJSON, +} from '../models/index'; + +export interface OrganizationsDeleteRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsDeletePreferEnum; +} + +export interface OrganizationsGetRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: OrganizationsGetPreferEnum; +} + +export interface OrganizationsPatchRequest { + organizationId?: number; + organizationName?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: OrganizationsPatchPreferEnum; + organizations?: Organizations; +} + +export interface OrganizationsPostRequest { + select?: string; + prefer?: OrganizationsPostPreferEnum; + organizations?: Organizations; +} + +/** + * + */ +export class OrganizationsApi extends runtime.BaseAPI { + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.organizationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['organizationName'] != null) { + queryParameters['organization_name'] = requestParameters['organizationName']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/organizations`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OrganizationsToJSON(requestParameters['organizations']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Companies or customer groups that can be attached to Portal Accounts + */ + async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.organizationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const OrganizationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; +/** + * @export + */ +export const OrganizationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; +/** + * @export + */ +export const OrganizationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; +/** + * @export + */ +export const OrganizationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts new file mode 100644 index 000000000..79587e887 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccountRbac, +} from '../models/index'; +import { + PortalAccountRbacFromJSON, + PortalAccountRbacToJSON, +} from '../models/index'; + +export interface PortalAccountRbacDeleteRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacDeletePreferEnum; +} + +export interface PortalAccountRbacGetRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountRbacGetPreferEnum; +} + +export interface PortalAccountRbacPatchRequest { + id?: number; + portalAccountId?: string; + portalUserId?: string; + roleName?: string; + userJoinedAccount?: boolean; + prefer?: PortalAccountRbacPatchPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +export interface PortalAccountRbacPostRequest { + select?: string; + prefer?: PortalAccountRbacPostPreferEnum; + portalAccountRbac?: PortalAccountRbac; +} + +/** + * + */ +export class PortalAccountRbacApi extends runtime.BaseAPI { + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['roleName'] != null) { + queryParameters['role_name'] = requestParameters['roleName']; + } + + if (requestParameters['userJoinedAccount'] != null) { + queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_account_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User roles and permissions for specific portal accounts + */ + async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts new file mode 100644 index 000000000..f7db3d925 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts @@ -0,0 +1,487 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalAccounts, +} from '../models/index'; +import { + PortalAccountsFromJSON, + PortalAccountsToJSON, +} from '../models/index'; + +export interface PortalAccountsDeleteRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsDeletePreferEnum; +} + +export interface PortalAccountsGetRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalAccountsGetPreferEnum; +} + +export interface PortalAccountsPatchRequest { + portalAccountId?: string; + organizationId?: number; + portalPlanType?: string; + userAccountName?: string; + internalAccountName?: string; + portalAccountUserLimit?: number; + portalAccountUserLimitInterval?: string; + portalAccountUserLimitRps?: number; + billingType?: string; + stripeSubscriptionId?: string; + gcpAccountId?: string; + gcpEntitlementId?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalAccountsPatchPreferEnum; + portalAccounts?: PortalAccounts; +} + +export interface PortalAccountsPostRequest { + select?: string; + prefer?: PortalAccountsPostPreferEnum; + portalAccounts?: PortalAccounts; +} + +/** + * + */ +export class PortalAccountsApi extends runtime.BaseAPI { + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['organizationId'] != null) { + queryParameters['organization_id'] = requestParameters['organizationId']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['internalAccountName'] != null) { + queryParameters['internal_account_name'] = requestParameters['internalAccountName']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['portalAccountUserLimitInterval'] != null) { + queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; + } + + if (requestParameters['portalAccountUserLimitRps'] != null) { + queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['stripeSubscriptionId'] != null) { + queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; + } + + if (requestParameters['gcpAccountId'] != null) { + queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPatchRaw(requestParameters, initOverrides); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_accounts`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalAccountsToJSON(requestParameters['portalAccounts']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Multi-tenant accounts with plans and billing integration + */ + async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalAccountsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalAccountsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; +/** + * @export + */ +export const PortalAccountsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; +/** + * @export + */ +export const PortalAccountsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; +/** + * @export + */ +export const PortalAccountsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts new file mode 100644 index 000000000..05f0a6095 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplicationRbac, +} from '../models/index'; +import { + PortalApplicationRbacFromJSON, + PortalApplicationRbacToJSON, +} from '../models/index'; + +export interface PortalApplicationRbacDeleteRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacDeletePreferEnum; +} + +export interface PortalApplicationRbacGetRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationRbacGetPreferEnum; +} + +export interface PortalApplicationRbacPatchRequest { + id?: number; + portalApplicationId?: string; + portalUserId?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationRbacPatchPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +export interface PortalApplicationRbacPostRequest { + select?: string; + prefer?: PortalApplicationRbacPostPreferEnum; + portalApplicationRbac?: PortalApplicationRbac; +} + +/** + * + */ +export class PortalApplicationRbacApi extends runtime.BaseAPI { + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['id'] != null) { + queryParameters['id'] = requestParameters['id']; + } + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_application_rbac`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User access controls for specific applications + */ + async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationRbacDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationRbacPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts new file mode 100644 index 000000000..4161669cc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts @@ -0,0 +1,472 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalApplications, +} from '../models/index'; +import { + PortalApplicationsFromJSON, + PortalApplicationsToJSON, +} from '../models/index'; + +export interface PortalApplicationsDeleteRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsDeletePreferEnum; +} + +export interface PortalApplicationsGetRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalApplicationsGetPreferEnum; +} + +export interface PortalApplicationsPatchRequest { + portalApplicationId?: string; + portalAccountId?: string; + portalApplicationName?: string; + emoji?: string; + portalApplicationUserLimit?: number; + portalApplicationUserLimitInterval?: string; + portalApplicationUserLimitRps?: number; + portalApplicationDescription?: string; + favoriteServiceIds?: string; + secretKeyHash?: string; + secretKeyRequired?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalApplicationsPatchPreferEnum; + portalApplications?: PortalApplications; +} + +export interface PortalApplicationsPostRequest { + select?: string; + prefer?: PortalApplicationsPostPreferEnum; + portalApplications?: PortalApplications; +} + +/** + * + */ +export class PortalApplicationsApi extends runtime.BaseAPI { + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalApplicationId'] != null) { + queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; + } + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['portalApplicationName'] != null) { + queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; + } + + if (requestParameters['emoji'] != null) { + queryParameters['emoji'] = requestParameters['emoji']; + } + + if (requestParameters['portalApplicationUserLimit'] != null) { + queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; + } + + if (requestParameters['portalApplicationUserLimitInterval'] != null) { + queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; + } + + if (requestParameters['portalApplicationUserLimitRps'] != null) { + queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; + } + + if (requestParameters['portalApplicationDescription'] != null) { + queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; + } + + if (requestParameters['favoriteServiceIds'] != null) { + queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; + } + + if (requestParameters['secretKeyHash'] != null) { + queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; + } + + if (requestParameters['secretKeyRequired'] != null) { + queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPatchRaw(requestParameters, initOverrides); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_applications`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalApplicationsToJSON(requestParameters['portalApplications']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Applications created within portal accounts with their own rate limits and settings + */ + async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalApplicationsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalApplicationsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; +/** + * @export + */ +export const PortalApplicationsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; +/** + * @export + */ +export const PortalApplicationsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts new file mode 100644 index 000000000..6400389ad --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts @@ -0,0 +1,352 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalPlans, +} from '../models/index'; +import { + PortalPlansFromJSON, + PortalPlansToJSON, +} from '../models/index'; + +export interface PortalPlansDeleteRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansDeletePreferEnum; +} + +export interface PortalPlansGetRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalPlansGetPreferEnum; +} + +export interface PortalPlansPatchRequest { + portalPlanType?: string; + portalPlanTypeDescription?: string; + planUsageLimit?: number; + planUsageLimitInterval?: string; + planRateLimitRps?: number; + planApplicationLimit?: number; + prefer?: PortalPlansPatchPreferEnum; + portalPlans?: PortalPlans; +} + +export interface PortalPlansPostRequest { + select?: string; + prefer?: PortalPlansPostPreferEnum; + portalPlans?: PortalPlans; +} + +/** + * + */ +export class PortalPlansApi extends runtime.BaseAPI { + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalPlansGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['portalPlanTypeDescription'] != null) { + queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; + } + + if (requestParameters['planUsageLimit'] != null) { + queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; + } + + if (requestParameters['planUsageLimitInterval'] != null) { + queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; + } + + if (requestParameters['planRateLimitRps'] != null) { + queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; + } + + if (requestParameters['planApplicationLimit'] != null) { + queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPatchRaw(requestParameters, initOverrides); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_plans`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalPlansToJSON(requestParameters['portalPlans']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available subscription plans for Portal Accounts + */ + async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalPlansPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalPlansDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; +/** + * @export + */ +export const PortalPlansGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; +/** + * @export + */ +export const PortalPlansPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; +/** + * @export + */ +export const PortalPlansPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts b/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts new file mode 100644 index 000000000..86027a28c --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts @@ -0,0 +1,367 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalUsers, +} from '../models/index'; +import { + PortalUsersFromJSON, + PortalUsersToJSON, +} from '../models/index'; + +export interface PortalUsersDeleteRequest { + portalUserId?: string; + portalUserEmail?: string; + signedUp?: boolean; + portalAdmin?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalUsersDeletePreferEnum; +} + +export interface PortalUsersGetRequest { + portalUserId?: string; + portalUserEmail?: string; + signedUp?: boolean; + portalAdmin?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalUsersGetPreferEnum; +} + +export interface PortalUsersPatchRequest { + portalUserId?: string; + portalUserEmail?: string; + signedUp?: boolean; + portalAdmin?: boolean; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: PortalUsersPatchPreferEnum; + portalUsers?: PortalUsers; +} + +export interface PortalUsersPostRequest { + select?: string; + prefer?: PortalUsersPostPreferEnum; + portalUsers?: PortalUsers; +} + +/** + * + */ +export class PortalUsersApi extends runtime.BaseAPI { + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersDeleteRaw(requestParameters: PortalUsersDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['portalUserEmail'] != null) { + queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; + } + + if (requestParameters['signedUp'] != null) { + queryParameters['signed_up'] = requestParameters['signedUp']; + } + + if (requestParameters['portalAdmin'] != null) { + queryParameters['portal_admin'] = requestParameters['portalAdmin']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_users`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersDelete(requestParameters: PortalUsersDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalUsersDeleteRaw(requestParameters, initOverrides); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersGetRaw(requestParameters: PortalUsersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['portalUserEmail'] != null) { + queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; + } + + if (requestParameters['signedUp'] != null) { + queryParameters['signed_up'] = requestParameters['signedUp']; + } + + if (requestParameters['portalAdmin'] != null) { + queryParameters['portal_admin'] = requestParameters['portalAdmin']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_users`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalUsersFromJSON)); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersGet(requestParameters: PortalUsersGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalUsersGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersPatchRaw(requestParameters: PortalUsersPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['portalUserId'] != null) { + queryParameters['portal_user_id'] = requestParameters['portalUserId']; + } + + if (requestParameters['portalUserEmail'] != null) { + queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; + } + + if (requestParameters['signedUp'] != null) { + queryParameters['signed_up'] = requestParameters['signedUp']; + } + + if (requestParameters['portalAdmin'] != null) { + queryParameters['portal_admin'] = requestParameters['portalAdmin']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_users`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PortalUsersToJSON(requestParameters['portalUsers']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersPatch(requestParameters: PortalUsersPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalUsersPatchRaw(requestParameters, initOverrides); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersPostRaw(requestParameters: PortalUsersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_users`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PortalUsersToJSON(requestParameters['portalUsers']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Users who can access the portal and belong to multiple accounts + */ + async portalUsersPost(requestParameters: PortalUsersPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.portalUsersPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const PortalUsersDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalUsersDeletePreferEnum = typeof PortalUsersDeletePreferEnum[keyof typeof PortalUsersDeletePreferEnum]; +/** + * @export + */ +export const PortalUsersGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalUsersGetPreferEnum = typeof PortalUsersGetPreferEnum[keyof typeof PortalUsersGetPreferEnum]; +/** + * @export + */ +export const PortalUsersPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type PortalUsersPatchPreferEnum = typeof PortalUsersPatchPreferEnum[keyof typeof PortalUsersPatchPreferEnum]; +/** + * @export + */ +export const PortalUsersPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type PortalUsersPostPreferEnum = typeof PortalUsersPostPreferEnum[keyof typeof PortalUsersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts new file mode 100644 index 000000000..a933445cb --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts @@ -0,0 +1,152 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PortalWorkersAccountData, +} from '../models/index'; +import { + PortalWorkersAccountDataFromJSON, + PortalWorkersAccountDataToJSON, +} from '../models/index'; + +export interface PortalWorkersAccountDataGetRequest { + portalAccountId?: string; + userAccountName?: string; + portalPlanType?: string; + billingType?: string; + portalAccountUserLimit?: number; + gcpEntitlementId?: string; + ownerEmail?: string; + ownerUserId?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: PortalWorkersAccountDataGetPreferEnum; +} + +/** + * + */ +export class PortalWorkersAccountDataApi extends runtime.BaseAPI { + + /** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' + */ + async portalWorkersAccountDataGetRaw(requestParameters: PortalWorkersAccountDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['portalAccountId'] != null) { + queryParameters['portal_account_id'] = requestParameters['portalAccountId']; + } + + if (requestParameters['userAccountName'] != null) { + queryParameters['user_account_name'] = requestParameters['userAccountName']; + } + + if (requestParameters['portalPlanType'] != null) { + queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; + } + + if (requestParameters['billingType'] != null) { + queryParameters['billing_type'] = requestParameters['billingType']; + } + + if (requestParameters['portalAccountUserLimit'] != null) { + queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; + } + + if (requestParameters['gcpEntitlementId'] != null) { + queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; + } + + if (requestParameters['ownerEmail'] != null) { + queryParameters['owner_email'] = requestParameters['ownerEmail']; + } + + if (requestParameters['ownerUserId'] != null) { + queryParameters['owner_user_id'] = requestParameters['ownerUserId']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/portal_workers_account_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalWorkersAccountDataFromJSON)); + } + + /** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' + */ + async portalWorkersAccountDataGet(requestParameters: PortalWorkersAccountDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.portalWorkersAccountDataGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + +} + +/** + * @export + */ +export const PortalWorkersAccountDataGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type PortalWorkersAccountDataGetPreferEnum = typeof PortalWorkersAccountDataGetPreferEnum[keyof typeof PortalWorkersAccountDataGetPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts new file mode 100644 index 000000000..9e4f193fc --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceEndpoints, +} from '../models/index'; +import { + ServiceEndpointsFromJSON, + ServiceEndpointsToJSON, +} from '../models/index'; + +export interface ServiceEndpointsDeleteRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsDeletePreferEnum; +} + +export interface ServiceEndpointsGetRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceEndpointsGetPreferEnum; +} + +export interface ServiceEndpointsPatchRequest { + endpointId?: number; + serviceId?: string; + endpointType?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceEndpointsPatchPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +export interface ServiceEndpointsPostRequest { + select?: string; + prefer?: ServiceEndpointsPostPreferEnum; + serviceEndpoints?: ServiceEndpoints; +} + +/** + * + */ +export class ServiceEndpointsApi extends runtime.BaseAPI { + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['endpointId'] != null) { + queryParameters['endpoint_id'] = requestParameters['endpointId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['endpointType'] != null) { + queryParameters['endpoint_type'] = requestParameters['endpointType']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_endpoints`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Available endpoint types for each service + */ + async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceEndpointsPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceEndpointsDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; +/** + * @export + */ +export const ServiceEndpointsGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; +/** + * @export + */ +export const ServiceEndpointsPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts new file mode 100644 index 000000000..1a5f43ac7 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ServiceFallbacks, +} from '../models/index'; +import { + ServiceFallbacksFromJSON, + ServiceFallbacksToJSON, +} from '../models/index'; + +export interface ServiceFallbacksDeleteRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksDeletePreferEnum; +} + +export interface ServiceFallbacksGetRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServiceFallbacksGetPreferEnum; +} + +export interface ServiceFallbacksPatchRequest { + serviceFallbackId?: number; + serviceId?: string; + fallbackUrl?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServiceFallbacksPatchPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +export interface ServiceFallbacksPostRequest { + select?: string; + prefer?: ServiceFallbacksPostPreferEnum; + serviceFallbacks?: ServiceFallbacks; +} + +/** + * + */ +export class ServiceFallbacksApi extends runtime.BaseAPI { + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceFallbackId'] != null) { + queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; + } + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['fallbackUrl'] != null) { + queryParameters['fallback_url'] = requestParameters['fallbackUrl']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/service_fallbacks`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Fallback URLs for services when primary endpoints fail + */ + async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceFallbacksPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServiceFallbacksDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; +/** + * @export + */ +export const ServiceFallbacksGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; +/** + * @export + */ +export const ServiceFallbacksPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts new file mode 100644 index 000000000..36471e815 --- /dev/null +++ b/portal-db/sdk/typescript/src/apis/ServicesApi.ts @@ -0,0 +1,532 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Services, +} from '../models/index'; +import { + ServicesFromJSON, + ServicesToJSON, +} from '../models/index'; + +export interface ServicesDeleteRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesDeletePreferEnum; +} + +export interface ServicesGetRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + select?: string; + order?: string; + range?: string; + rangeUnit?: string; + offset?: string; + limit?: string; + prefer?: ServicesGetPreferEnum; +} + +export interface ServicesPatchRequest { + serviceId?: string; + serviceName?: string; + computeUnitsPerRelay?: number; + serviceDomains?: string; + serviceOwnerAddress?: string; + networkId?: string; + active?: boolean; + beta?: boolean; + comingSoon?: boolean; + qualityFallbackEnabled?: boolean; + hardFallbackEnabled?: boolean; + svgIcon?: string; + publicEndpointUrl?: string; + statusEndpointUrl?: string; + statusQuery?: string; + deletedAt?: string; + createdAt?: string; + updatedAt?: string; + prefer?: ServicesPatchPreferEnum; + services?: Services; +} + +export interface ServicesPostRequest { + select?: string; + prefer?: ServicesPostPreferEnum; + services?: Services; +} + +/** + * + */ +export class ServicesApi extends runtime.BaseAPI { + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['range'] != null) { + headerParameters['Range'] = String(requestParameters['range']); + } + + if (requestParameters['rangeUnit'] != null) { + headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); + } + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { + const response = await this.servicesGetRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 206: + return null; + default: + return await response.value(); + } + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['serviceId'] != null) { + queryParameters['service_id'] = requestParameters['serviceId']; + } + + if (requestParameters['serviceName'] != null) { + queryParameters['service_name'] = requestParameters['serviceName']; + } + + if (requestParameters['computeUnitsPerRelay'] != null) { + queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; + } + + if (requestParameters['serviceDomains'] != null) { + queryParameters['service_domains'] = requestParameters['serviceDomains']; + } + + if (requestParameters['serviceOwnerAddress'] != null) { + queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; + } + + if (requestParameters['networkId'] != null) { + queryParameters['network_id'] = requestParameters['networkId']; + } + + if (requestParameters['active'] != null) { + queryParameters['active'] = requestParameters['active']; + } + + if (requestParameters['beta'] != null) { + queryParameters['beta'] = requestParameters['beta']; + } + + if (requestParameters['comingSoon'] != null) { + queryParameters['coming_soon'] = requestParameters['comingSoon']; + } + + if (requestParameters['qualityFallbackEnabled'] != null) { + queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; + } + + if (requestParameters['hardFallbackEnabled'] != null) { + queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; + } + + if (requestParameters['svgIcon'] != null) { + queryParameters['svg_icon'] = requestParameters['svgIcon']; + } + + if (requestParameters['publicEndpointUrl'] != null) { + queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; + } + + if (requestParameters['statusEndpointUrl'] != null) { + queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; + } + + if (requestParameters['statusQuery'] != null) { + queryParameters['status_query'] = requestParameters['statusQuery']; + } + + if (requestParameters['deletedAt'] != null) { + queryParameters['deleted_at'] = requestParameters['deletedAt']; + } + + if (requestParameters['createdAt'] != null) { + queryParameters['created_at'] = requestParameters['createdAt']; + } + + if (requestParameters['updatedAt'] != null) { + queryParameters['updated_at'] = requestParameters['updatedAt']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPatchRaw(requestParameters, initOverrides); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['select'] != null) { + queryParameters['select'] = requestParameters['select']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['prefer'] != null) { + headerParameters['Prefer'] = String(requestParameters['prefer']); + } + + + let urlPath = `/services`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServicesToJSON(requestParameters['services']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported blockchain services from the Pocket Network + */ + async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.servicesPostRaw(requestParameters, initOverrides); + } + +} + +/** + * @export + */ +export const ServicesDeletePreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; +/** + * @export + */ +export const ServicesGetPreferEnum = { + Countnone: 'count=none' +} as const; +export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; +/** + * @export + */ +export const ServicesPatchPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none' +} as const; +export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; +/** + * @export + */ +export const ServicesPostPreferEnum = { + Returnrepresentation: 'return=representation', + Returnminimal: 'return=minimal', + Returnnone: 'return=none', + ResolutionignoreDuplicates: 'resolution=ignore-duplicates', + ResolutionmergeDuplicates: 'resolution=merge-duplicates' +} as const; +export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts index 167659e57..0a2a3000d 100644 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ b/portal-db/sdk/typescript/src/apis/index.ts @@ -1,9 +1,21 @@ /* tslint:disable */ /* eslint-disable */ export * from './IntrospectionApi'; +export * from './NetworksApi'; +export * from './OrganizationsApi'; +export * from './PortalAccountRbacApi'; +export * from './PortalAccountsApi'; +export * from './PortalApplicationRbacApi'; +export * from './PortalApplicationsApi'; +export * from './PortalPlansApi'; +export * from './PortalUsersApi'; +export * from './PortalWorkersAccountDataApi'; export * from './RpcArmorApi'; export * from './RpcDearmorApi'; export * from './RpcGenRandomUuidApi'; export * from './RpcGenSaltApi'; export * from './RpcPgpArmorHeadersApi'; export * from './RpcPgpKeyIdApi'; +export * from './ServiceEndpointsApi'; +export * from './ServiceFallbacksApi'; +export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts new file mode 100644 index 000000000..8ff34b54a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Networks.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain networks (Pocket mainnet, testnet, etc.) + * @export + * @interface Networks + */ +export interface Networks { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Networks + */ + networkId: string; +} + +/** + * Check if a given object implements the Networks interface. + */ +export function instanceOfNetworks(value: object): value is Networks { + if (!('networkId' in value) || value['networkId'] === undefined) return false; + return true; +} + +export function NetworksFromJSON(json: any): Networks { + return NetworksFromJSONTyped(json, false); +} + +export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { + if (json == null) { + return json; + } + return { + + 'networkId': json['network_id'], + }; +} + +export function NetworksToJSON(json: any): Networks { + return NetworksToJSONTyped(json, false); +} + +export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'network_id': value['networkId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts new file mode 100644 index 000000000..3c35c6a79 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Organizations.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Companies or customer groups that can be attached to Portal Accounts + * @export + * @interface Organizations + */ +export interface Organizations { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof Organizations + */ + organizationId: number; + /** + * Name of the organization + * @type {string} + * @memberof Organizations + */ + organizationName: string; + /** + * Soft delete timestamp + * @type {string} + * @memberof Organizations + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Organizations + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Organizations interface. + */ +export function instanceOfOrganizations(value: object): value is Organizations { + if (!('organizationId' in value) || value['organizationId'] === undefined) return false; + if (!('organizationName' in value) || value['organizationName'] === undefined) return false; + return true; +} + +export function OrganizationsFromJSON(json: any): Organizations { + return OrganizationsFromJSONTyped(json, false); +} + +export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { + if (json == null) { + return json; + } + return { + + 'organizationId': json['organization_id'], + 'organizationName': json['organization_name'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function OrganizationsToJSON(json: any): Organizations { + return OrganizationsToJSONTyped(json, false); +} + +export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'organization_id': value['organizationId'], + 'organization_name': value['organizationName'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts new file mode 100644 index 000000000..b605719a0 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User roles and permissions for specific portal accounts + * @export + * @interface PortalAccountRbac + */ +export interface PortalAccountRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalAccountRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalAccountRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalAccountRbac + */ + roleName: string; + /** + * + * @type {boolean} + * @memberof PortalAccountRbac + */ + userJoinedAccount?: boolean; +} + +/** + * Check if a given object implements the PortalAccountRbac interface. + */ +export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + if (!('roleName' in value) || value['roleName'] === undefined) return false; + return true; +} + +export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { + return PortalAccountRbacFromJSONTyped(json, false); +} + +export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalAccountId': json['portal_account_id'], + 'portalUserId': json['portal_user_id'], + 'roleName': json['role_name'], + 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], + }; +} + +export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { + return PortalAccountRbacToJSONTyped(json, false); +} + +export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_account_id': value['portalAccountId'], + 'portal_user_id': value['portalUserId'], + 'role_name': value['roleName'], + 'user_joined_account': value['userJoinedAccount'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts new file mode 100644 index 000000000..ee2b80517 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalAccounts.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Multi-tenant accounts with plans and billing integration + * @export + * @interface PortalAccounts + */ +export interface PortalAccounts { + /** + * Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalAccounts + */ + portalAccountId: string; + /** + * Note: + * This is a Foreign Key to `organizations.organization_id`. + * @type {number} + * @memberof PortalAccounts + */ + organizationId?: number; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalAccounts + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + userAccountName?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + internalAccountName?: string; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalAccounts + */ + portalAccountUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + billingType?: string; + /** + * Stripe subscription identifier for billing + * @type {string} + * @memberof PortalAccounts + */ + stripeSubscriptionId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpAccountId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalAccounts + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalAccountsPortalAccountUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalAccounts interface. + */ +export function instanceOfPortalAccounts(value: object): value is PortalAccounts { + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalAccountsFromJSON(json: any): PortalAccounts { + return PortalAccountsFromJSONTyped(json, false); +} + +export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'], + 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], + 'portalPlanType': json['portal_plan_type'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], + 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], + 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalAccountsToJSON(json: any): PortalAccounts { + return PortalAccountsToJSONTyped(json, false); +} + +export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'organization_id': value['organizationId'], + 'portal_plan_type': value['portalPlanType'], + 'user_account_name': value['userAccountName'], + 'internal_account_name': value['internalAccountName'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], + 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], + 'billing_type': value['billingType'], + 'stripe_subscription_id': value['stripeSubscriptionId'], + 'gcp_account_id': value['gcpAccountId'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts new file mode 100644 index 000000000..5216b4f8a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User access controls for specific applications + * @export + * @interface PortalApplicationRbac + */ +export interface PortalApplicationRbac { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof PortalApplicationRbac + */ + id: number; + /** + * Note: + * This is a Foreign Key to `portal_applications.portal_application_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + * @type {string} + * @memberof PortalApplicationRbac + */ + portalUserId: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplicationRbac + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the PortalApplicationRbac interface. + */ +export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + return true; +} + +export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacFromJSONTyped(json, false); +} + +export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'portalApplicationId': json['portal_application_id'], + 'portalUserId': json['portal_user_id'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { + return PortalApplicationRbacToJSONTyped(json, false); +} + +export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'portal_application_id': value['portalApplicationId'], + 'portal_user_id': value['portalUserId'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts new file mode 100644 index 000000000..08c5953bc --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalApplications.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Applications created within portal accounts with their own rate limits and settings + * @export + * @interface PortalApplications + */ +export interface PortalApplications { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalApplications + */ + portalApplicationId: string; + /** + * Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + * @type {string} + * @memberof PortalApplications + */ + portalAccountId: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationName?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + emoji?: string; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; + /** + * + * @type {number} + * @memberof PortalApplications + */ + portalApplicationUserLimitRps?: number; + /** + * + * @type {string} + * @memberof PortalApplications + */ + portalApplicationDescription?: string; + /** + * + * @type {Array} + * @memberof PortalApplications + */ + favoriteServiceIds?: Array; + /** + * Hashed secret key for application authentication + * @type {string} + * @memberof PortalApplications + */ + secretKeyHash?: string; + /** + * + * @type {boolean} + * @memberof PortalApplications + */ + secretKeyRequired?: boolean; + /** + * + * @type {string} + * @memberof PortalApplications + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalApplications + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalApplications interface. + */ +export function instanceOfPortalApplications(value: object): value is PortalApplications { + if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; + if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; + return true; +} + +export function PortalApplicationsFromJSON(json: any): PortalApplications { + return PortalApplicationsFromJSONTyped(json, false); +} + +export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { + if (json == null) { + return json; + } + return { + + 'portalApplicationId': json['portal_application_id'], + 'portalAccountId': json['portal_account_id'], + 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], + 'emoji': json['emoji'] == null ? undefined : json['emoji'], + 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], + 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], + 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], + 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], + 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], + 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], + 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalApplicationsToJSON(json: any): PortalApplications { + return PortalApplicationsToJSONTyped(json, false); +} + +export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_application_id': value['portalApplicationId'], + 'portal_account_id': value['portalAccountId'], + 'portal_application_name': value['portalApplicationName'], + 'emoji': value['emoji'], + 'portal_application_user_limit': value['portalApplicationUserLimit'], + 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], + 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], + 'portal_application_description': value['portalApplicationDescription'], + 'favorite_service_ids': value['favoriteServiceIds'], + 'secret_key_hash': value['secretKeyHash'], + 'secret_key_required': value['secretKeyRequired'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts new file mode 100644 index 000000000..d89b2b209 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalPlans.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available subscription plans for Portal Accounts + * @export + * @interface PortalPlans + */ +export interface PortalPlans { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalPlans + */ + portalPlanType: string; + /** + * + * @type {string} + * @memberof PortalPlans + */ + portalPlanTypeDescription?: string; + /** + * Maximum usage allowed within the interval + * @type {number} + * @memberof PortalPlans + */ + planUsageLimit?: number; + /** + * + * @type {string} + * @memberof PortalPlans + */ + planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; + /** + * Rate limit in requests per second + * @type {number} + * @memberof PortalPlans + */ + planRateLimitRps?: number; + /** + * + * @type {number} + * @memberof PortalPlans + */ + planApplicationLimit?: number; +} + + +/** + * @export + */ +export const PortalPlansPlanUsageLimitIntervalEnum = { + Day: 'day', + Month: 'month', + Year: 'year' +} as const; +export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; + + +/** + * Check if a given object implements the PortalPlans interface. + */ +export function instanceOfPortalPlans(value: object): value is PortalPlans { + if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; + return true; +} + +export function PortalPlansFromJSON(json: any): PortalPlans { + return PortalPlansFromJSONTyped(json, false); +} + +export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { + if (json == null) { + return json; + } + return { + + 'portalPlanType': json['portal_plan_type'], + 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], + 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], + 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], + 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], + 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], + }; +} + +export function PortalPlansToJSON(json: any): PortalPlans { + return PortalPlansToJSONTyped(json, false); +} + +export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_plan_type': value['portalPlanType'], + 'portal_plan_type_description': value['portalPlanTypeDescription'], + 'plan_usage_limit': value['planUsageLimit'], + 'plan_usage_limit_interval': value['planUsageLimitInterval'], + 'plan_rate_limit_rps': value['planRateLimitRps'], + 'plan_application_limit': value['planApplicationLimit'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalUsers.ts b/portal-db/sdk/typescript/src/models/PortalUsers.ts new file mode 100644 index 000000000..fe8765d1a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalUsers.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Users who can access the portal and belong to multiple accounts + * @export + * @interface PortalUsers + */ +export interface PortalUsers { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalUsers + */ + portalUserId: string; + /** + * Unique email address for the user + * @type {string} + * @memberof PortalUsers + */ + portalUserEmail: string; + /** + * + * @type {boolean} + * @memberof PortalUsers + */ + signedUp?: boolean; + /** + * Whether user has admin privileges across the portal + * @type {boolean} + * @memberof PortalUsers + */ + portalAdmin?: boolean; + /** + * + * @type {string} + * @memberof PortalUsers + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof PortalUsers + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof PortalUsers + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the PortalUsers interface. + */ +export function instanceOfPortalUsers(value: object): value is PortalUsers { + if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; + if (!('portalUserEmail' in value) || value['portalUserEmail'] === undefined) return false; + return true; +} + +export function PortalUsersFromJSON(json: any): PortalUsers { + return PortalUsersFromJSONTyped(json, false); +} + +export function PortalUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalUsers { + if (json == null) { + return json; + } + return { + + 'portalUserId': json['portal_user_id'], + 'portalUserEmail': json['portal_user_email'], + 'signedUp': json['signed_up'] == null ? undefined : json['signed_up'], + 'portalAdmin': json['portal_admin'] == null ? undefined : json['portal_admin'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function PortalUsersToJSON(json: any): PortalUsers { + return PortalUsersToJSONTyped(json, false); +} + +export function PortalUsersToJSONTyped(value?: PortalUsers | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_user_id': value['portalUserId'], + 'portal_user_email': value['portalUserEmail'], + 'signed_up': value['signedUp'], + 'portal_admin': value['portalAdmin'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts new file mode 100644 index 000000000..44834dcec --- /dev/null +++ b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' + * @export + * @interface PortalWorkersAccountData + */ +export interface PortalWorkersAccountData { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalWorkersAccountData + */ + portalAccountId?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + userAccountName?: string; + /** + * Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + * @type {string} + * @memberof PortalWorkersAccountData + */ + portalPlanType?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + billingType?: string; + /** + * + * @type {number} + * @memberof PortalWorkersAccountData + */ + portalAccountUserLimit?: number; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + gcpEntitlementId?: string; + /** + * + * @type {string} + * @memberof PortalWorkersAccountData + */ + ownerEmail?: string; + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof PortalWorkersAccountData + */ + ownerUserId?: string; +} + +/** + * Check if a given object implements the PortalWorkersAccountData interface. + */ +export function instanceOfPortalWorkersAccountData(value: object): value is PortalWorkersAccountData { + return true; +} + +export function PortalWorkersAccountDataFromJSON(json: any): PortalWorkersAccountData { + return PortalWorkersAccountDataFromJSONTyped(json, false); +} + +export function PortalWorkersAccountDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalWorkersAccountData { + if (json == null) { + return json; + } + return { + + 'portalAccountId': json['portal_account_id'] == null ? undefined : json['portal_account_id'], + 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], + 'portalPlanType': json['portal_plan_type'] == null ? undefined : json['portal_plan_type'], + 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], + 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], + 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], + 'ownerEmail': json['owner_email'] == null ? undefined : json['owner_email'], + 'ownerUserId': json['owner_user_id'] == null ? undefined : json['owner_user_id'], + }; +} + +export function PortalWorkersAccountDataToJSON(json: any): PortalWorkersAccountData { + return PortalWorkersAccountDataToJSONTyped(json, false); +} + +export function PortalWorkersAccountDataToJSONTyped(value?: PortalWorkersAccountData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'portal_account_id': value['portalAccountId'], + 'user_account_name': value['userAccountName'], + 'portal_plan_type': value['portalPlanType'], + 'billing_type': value['billingType'], + 'portal_account_user_limit': value['portalAccountUserLimit'], + 'gcp_entitlement_id': value['gcpEntitlementId'], + 'owner_email': value['ownerEmail'], + 'owner_user_id': value['ownerUserId'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts new file mode 100644 index 000000000..516acad4a --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Available endpoint types for each service + * @export + * @interface ServiceEndpoints + */ +export interface ServiceEndpoints { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceEndpoints + */ + endpointId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceEndpoints + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + endpointType?: ServiceEndpointsEndpointTypeEnum; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceEndpoints + */ + updatedAt?: string; +} + + +/** + * @export + */ +export const ServiceEndpointsEndpointTypeEnum = { + CometBft: 'cometBFT', + Cosmos: 'cosmos', + Rest: 'REST', + JsonRpc: 'JSON-RPC', + Wss: 'WSS', + GRpc: 'gRPC' +} as const; +export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; + + +/** + * Check if a given object implements the ServiceEndpoints interface. + */ +export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { + if (!('endpointId' in value) || value['endpointId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + return true; +} + +export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { + return ServiceEndpointsFromJSONTyped(json, false); +} + +export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { + if (json == null) { + return json; + } + return { + + 'endpointId': json['endpoint_id'], + 'serviceId': json['service_id'], + 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { + return ServiceEndpointsToJSONTyped(json, false); +} + +export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'endpoint_id': value['endpointId'], + 'service_id': value['serviceId'], + 'endpoint_type': value['endpointType'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts new file mode 100644 index 000000000..a10559ad2 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Fallback URLs for services when primary endpoints fail + * @export + * @interface ServiceFallbacks + */ +export interface ServiceFallbacks { + /** + * Note: + * This is a Primary Key. + * @type {number} + * @memberof ServiceFallbacks + */ + serviceFallbackId: number; + /** + * Note: + * This is a Foreign Key to `services.service_id`. + * @type {string} + * @memberof ServiceFallbacks + */ + serviceId: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + fallbackUrl: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof ServiceFallbacks + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the ServiceFallbacks interface. + */ +export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { + if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; + return true; +} + +export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { + return ServiceFallbacksFromJSONTyped(json, false); +} + +export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { + if (json == null) { + return json; + } + return { + + 'serviceFallbackId': json['service_fallback_id'], + 'serviceId': json['service_id'], + 'fallbackUrl': json['fallback_url'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { + return ServiceFallbacksToJSONTyped(json, false); +} + +export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_fallback_id': value['serviceFallbackId'], + 'service_id': value['serviceId'], + 'fallback_url': value['fallbackUrl'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts new file mode 100644 index 000000000..766a36099 --- /dev/null +++ b/portal-db/sdk/typescript/src/models/Services.ts @@ -0,0 +1,206 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * standard public schema + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 12.0.2 (a4e00ff) + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Supported blockchain services from the Pocket Network + * @export + * @interface Services + */ +export interface Services { + /** + * Note: + * This is a Primary Key. + * @type {string} + * @memberof Services + */ + serviceId: string; + /** + * + * @type {string} + * @memberof Services + */ + serviceName: string; + /** + * Cost in compute units for each relay + * @type {number} + * @memberof Services + */ + computeUnitsPerRelay?: number; + /** + * Valid domains for this service + * @type {Array} + * @memberof Services + */ + serviceDomains: Array; + /** + * + * @type {string} + * @memberof Services + */ + serviceOwnerAddress?: string; + /** + * Note: + * This is a Foreign Key to `networks.network_id`. + * @type {string} + * @memberof Services + */ + networkId?: string; + /** + * + * @type {boolean} + * @memberof Services + */ + active?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + beta?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + comingSoon?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + qualityFallbackEnabled?: boolean; + /** + * + * @type {boolean} + * @memberof Services + */ + hardFallbackEnabled?: boolean; + /** + * + * @type {string} + * @memberof Services + */ + svgIcon?: string; + /** + * + * @type {string} + * @memberof Services + */ + publicEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusEndpointUrl?: string; + /** + * + * @type {string} + * @memberof Services + */ + statusQuery?: string; + /** + * + * @type {string} + * @memberof Services + */ + deletedAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + createdAt?: string; + /** + * + * @type {string} + * @memberof Services + */ + updatedAt?: string; +} + +/** + * Check if a given object implements the Services interface. + */ +export function instanceOfServices(value: object): value is Services { + if (!('serviceId' in value) || value['serviceId'] === undefined) return false; + if (!('serviceName' in value) || value['serviceName'] === undefined) return false; + if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; + return true; +} + +export function ServicesFromJSON(json: any): Services { + return ServicesFromJSONTyped(json, false); +} + +export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { + if (json == null) { + return json; + } + return { + + 'serviceId': json['service_id'], + 'serviceName': json['service_name'], + 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], + 'serviceDomains': json['service_domains'], + 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], + 'networkId': json['network_id'] == null ? undefined : json['network_id'], + 'active': json['active'] == null ? undefined : json['active'], + 'beta': json['beta'] == null ? undefined : json['beta'], + 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], + 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], + 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], + 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], + 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], + 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], + 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], + 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], + 'createdAt': json['created_at'] == null ? undefined : json['created_at'], + 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], + }; +} + +export function ServicesToJSON(json: any): Services { + return ServicesToJSONTyped(json, false); +} + +export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'service_id': value['serviceId'], + 'service_name': value['serviceName'], + 'compute_units_per_relay': value['computeUnitsPerRelay'], + 'service_domains': value['serviceDomains'], + 'service_owner_address': value['serviceOwnerAddress'], + 'network_id': value['networkId'], + 'active': value['active'], + 'beta': value['beta'], + 'coming_soon': value['comingSoon'], + 'quality_fallback_enabled': value['qualityFallbackEnabled'], + 'hard_fallback_enabled': value['hardFallbackEnabled'], + 'svg_icon': value['svgIcon'], + 'public_endpoint_url': value['publicEndpointUrl'], + 'status_endpoint_url': value['statusEndpointUrl'], + 'status_query': value['statusQuery'], + 'deleted_at': value['deletedAt'], + 'created_at': value['createdAt'], + 'updated_at': value['updatedAt'], + }; +} + diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts index 93ae61570..73f2ab8b2 100644 --- a/portal-db/sdk/typescript/src/models/index.ts +++ b/portal-db/sdk/typescript/src/models/index.ts @@ -1,4 +1,16 @@ /* tslint:disable */ /* eslint-disable */ +export * from './Networks'; +export * from './Organizations'; +export * from './PortalAccountRbac'; +export * from './PortalAccounts'; +export * from './PortalApplicationRbac'; +export * from './PortalApplications'; +export * from './PortalPlans'; +export * from './PortalUsers'; +export * from './PortalWorkersAccountData'; export * from './RpcArmorPostRequest'; export * from './RpcGenSaltPostRequest'; +export * from './ServiceEndpoints'; +export * from './ServiceFallbacks'; +export * from './Services'; From d629788cb8db52cc63b0e553ff4ed24696a5f8ed Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Thu, 9 Oct 2025 14:48:41 +0100 Subject: [PATCH 39/43] USe openapi-typescript for TS codegen --- .gitignore | 3 + portal-db/api/codegen/generate-sdks.sh | 178 +- portal-db/api/scripts/postgrest-gen-jwt.sh | 129 +- portal-db/sdk/typescript/.gitignore | 4 - portal-db/sdk/typescript/.npmignore | 1 - .../sdk/typescript/.openapi-generator-ignore | 23 - .../sdk/typescript/.openapi-generator/FILES | 42 - .../sdk/typescript/.openapi-generator/VERSION | 1 - portal-db/sdk/typescript/README.md | 75 +- portal-db/sdk/typescript/client.ts | 49 + portal-db/sdk/typescript/package-lock.json | 406 +++ portal-db/sdk/typescript/package.json | 29 +- .../typescript/src/apis/IntrospectionApi.ts | 51 - .../sdk/typescript/src/apis/NetworksApi.ts | 277 -- .../typescript/src/apis/OrganizationsApi.ts | 337 -- .../src/apis/PortalAccountRbacApi.ts | 337 -- .../typescript/src/apis/PortalAccountsApi.ts | 487 --- .../src/apis/PortalApplicationRbacApi.ts | 337 -- .../src/apis/PortalApplicationsApi.ts | 472 --- .../sdk/typescript/src/apis/PortalPlansApi.ts | 352 -- .../sdk/typescript/src/apis/PortalUsersApi.ts | 367 --- .../src/apis/PortalWorkersAccountDataApi.ts | 152 - .../sdk/typescript/src/apis/RpcArmorApi.ts | 124 - .../sdk/typescript/src/apis/RpcDearmorApi.ts | 124 - .../src/apis/RpcGenRandomUuidApi.ts | 102 - .../sdk/typescript/src/apis/RpcGenSaltApi.ts | 124 - .../src/apis/RpcPgpArmorHeadersApi.ts | 124 - .../sdk/typescript/src/apis/RpcPgpKeyIdApi.ts | 124 - .../src/apis/ServiceEndpointsApi.ts | 337 -- .../src/apis/ServiceFallbacksApi.ts | 337 -- .../sdk/typescript/src/apis/ServicesApi.ts | 532 --- portal-db/sdk/typescript/src/apis/index.ts | 21 - portal-db/sdk/typescript/src/index.ts | 5 - .../sdk/typescript/src/models/Networks.ts | 67 - .../typescript/src/models/Organizations.ts | 100 - .../src/models/PortalAccountRbac.ts | 104 - .../typescript/src/models/PortalAccounts.ts | 196 -- .../src/models/PortalApplicationRbac.ts | 103 - .../src/models/PortalApplications.ts | 185 -- .../sdk/typescript/src/models/PortalPlans.ts | 119 - .../sdk/typescript/src/models/PortalUsers.ts | 116 - .../src/models/PortalWorkersAccountData.ts | 124 - .../src/models/RpcArmorPostRequest.ts | 66 - .../src/models/RpcGenSaltPostRequest.ts | 66 - .../typescript/src/models/ServiceEndpoints.ts | 116 - .../typescript/src/models/ServiceFallbacks.ts | 102 - .../sdk/typescript/src/models/Services.ts | 206 -- portal-db/sdk/typescript/src/models/index.ts | 16 - portal-db/sdk/typescript/src/runtime.ts | 432 --- portal-db/sdk/typescript/tsconfig.json | 28 +- portal-db/sdk/typescript/types.ts | 2861 +++++++++++++++++ 51 files changed, 3599 insertions(+), 7471 deletions(-) delete mode 100644 portal-db/sdk/typescript/.gitignore delete mode 100644 portal-db/sdk/typescript/.npmignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator-ignore delete mode 100644 portal-db/sdk/typescript/.openapi-generator/FILES delete mode 100644 portal-db/sdk/typescript/.openapi-generator/VERSION create mode 100644 portal-db/sdk/typescript/client.ts create mode 100644 portal-db/sdk/typescript/package-lock.json delete mode 100644 portal-db/sdk/typescript/src/apis/IntrospectionApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/NetworksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/OrganizationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalPlansApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalUsersApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcArmorApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/ServicesApi.ts delete mode 100644 portal-db/sdk/typescript/src/apis/index.ts delete mode 100644 portal-db/sdk/typescript/src/index.ts delete mode 100644 portal-db/sdk/typescript/src/models/Networks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Organizations.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccountRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalAccounts.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalApplications.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalPlans.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalUsers.ts delete mode 100644 portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceEndpoints.ts delete mode 100644 portal-db/sdk/typescript/src/models/ServiceFallbacks.ts delete mode 100644 portal-db/sdk/typescript/src/models/Services.ts delete mode 100644 portal-db/sdk/typescript/src/models/index.ts delete mode 100644 portal-db/sdk/typescript/src/runtime.ts create mode 100644 portal-db/sdk/typescript/types.ts diff --git a/.gitignore b/.gitignore index 13b307e65..2b0886c6d 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,6 @@ pg_dump.sql # Benchmark Results bench_results + +# Node Modules (Portal DBTypeScript SDK) +node_modules \ No newline at end of file diff --git a/portal-db/api/codegen/generate-sdks.sh b/portal-db/api/codegen/generate-sdks.sh index 5ba3f4f95..4889aeeae 100755 --- a/portal-db/api/codegen/generate-sdks.sh +++ b/portal-db/api/codegen/generate-sdks.sh @@ -3,7 +3,7 @@ # Generate Go and TypeScript SDKs from OpenAPI specification # This script generates both Go and TypeScript SDKs for the Portal DB API # - Go SDK: Uses oapi-codegen for client and models generation -# - TypeScript SDK: Uses openapi-typescript for minimal, type-safe client generation +# - TypeScript SDK: Uses openapi-typescript for type generation and openapi-fetch for runtime client set -e @@ -72,37 +72,9 @@ fi echo -e "${GREEN}โœ… npm is installed: $(npm --version)${NC}" -# Check if Java is installed -if ! command -v java >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is not installed. OpenAPI Generator requires Java.${NC}" - echo " Install Java: brew install openjdk" - exit 1 -fi - -# Verify Java is working properly -if ! java -version >/dev/null 2>&1; then - echo -e "${RED}โŒ Java is installed but not working properly. OpenAPI Generator requires Java.${NC}" - echo " Fix Java installation: brew install openjdk" - echo " Add to PATH: export PATH=\"/opt/homebrew/opt/openjdk/bin:\$PATH\"" - exit 1 -fi - -JAVA_VERSION=$(java -version 2>&1 | head -n1) -echo -e "${GREEN}โœ… Java is available: $JAVA_VERSION${NC}" - -# Check if openapi-generator-cli is installed -if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo "๐Ÿ“ฆ Installing openapi-generator-cli..." - npm install -g @openapitools/openapi-generator-cli - - # Verify installation - if ! command -v openapi-generator-cli >/dev/null 2>&1; then - echo -e "${RED}โŒ Failed to install openapi-generator-cli. Please check your Node.js/npm installation.${NC}" - exit 1 - fi -fi - -echo -e "${GREEN}โœ… openapi-generator-cli is available: $(openapi-generator-cli version 2>/dev/null || echo 'installed')${NC}" +# Check if openapi-typescript is installed (npx will auto-install if needed) +# We'll use npx to run it, which handles installation automatically +echo -e "${GREEN}โœ… Using npx for openapi-typescript (will auto-install if needed)${NC}" # Check if configuration files exist for config_file in "$CONFIG_MODELS" "$CONFIG_CLIENT"; do @@ -161,29 +133,23 @@ fi echo -e "${GREEN}โœ… Go SDK generated successfully in separate files${NC}" echo "" -echo "๐Ÿ”ท Generating TypeScript SDK with minimal dependencies..." +echo "๐Ÿ”ท Generating TypeScript SDK with openapi-typescript..." # Create TypeScript output directory if it doesn't exist mkdir -p "$TS_OUTPUT_DIR" -# Clean previous generated TypeScript files (keep permanent files) +# Clean previous generated TypeScript files echo "๐Ÿงน Cleaning previous TypeScript generated files..." -rm -rf "$TS_OUTPUT_DIR/src" "$TS_OUTPUT_DIR/models" "$TS_OUTPUT_DIR/apis" - -# Generate TypeScript client using openapi-generator-cli (auto-generates client methods) -echo " Generating TypeScript client with built-in methods..." -if ! openapi-generator-cli generate \ - -i "$OPENAPI_V3_FILE" \ - -g typescript-fetch \ - -o "$TS_OUTPUT_DIR" \ - --skip-validate-spec \ - --additional-properties=npmName="@grove/portal-db-sdk",typescriptThreePlus=true; then - echo -e "${RED}โŒ Failed to generate TypeScript client${NC}" +rm -f "$TS_OUTPUT_DIR/types.ts" + +# Generate TypeScript types using openapi-typescript +echo " Generating TypeScript types from OpenAPI spec..." +if ! npx --yes openapi-typescript "$OPENAPI_V3_FILE" -o "$TS_OUTPUT_DIR/types.ts"; then + echo -e "${RED}โŒ Failed to generate TypeScript types${NC}" exit 1 fi - -echo -e "${GREEN}โœ… TypeScript SDK generated successfully${NC}" +echo -e "${GREEN}โœ… TypeScript types generated successfully${NC}" # ============================================================================ # PHASE 4: MODULE SETUP @@ -233,25 +199,85 @@ if [ ! -f "package.json" ]; then "name": "@grove/portal-db-sdk", "version": "1.0.0", "description": "TypeScript SDK for Grove Portal DB API", - "main": "index.ts", - "types": "types.d.ts", + "type": "module", + "main": "client.ts", + "types": "types.ts", "scripts": { - "build": "tsc", "type-check": "tsc --noEmit" }, "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], "author": "Grove Team", "license": "MIT", + "dependencies": { + "openapi-fetch": "^0.12.2" + }, "devDependencies": { - "typescript": "^5.0.0" + "typescript": "^5.0.0", + "openapi-typescript": "^7.4.3" }, "peerDependencies": { - "typescript": ">=4.5.0" + "typescript": ">=5.0.0" } } EOF fi +# Create a client.ts file that uses openapi-fetch +if [ ! -f "client.ts" ]; then + echo "๐Ÿ“ Creating client.ts..." + cat > client.ts << 'EOF' +/** + * Grove Portal DB API Client + * + * This client uses openapi-fetch for type-safe API requests. + * It's lightweight with zero dependencies beyond native fetch. + * + * @example + * ```typescript + * import createClient from './client'; + * + * const client = createClient({ baseUrl: 'http://localhost:3000' }); + * + * // GET request with full type safety + * const { data, error } = await client.GET('/portal_accounts'); + * + * // POST request with typed body + * const { data, error } = await client.POST('/portal_accounts', { + * body: { + * portal_plan_type: 'PLAN_FREE', + * // ... other fields + * } + * }); + * ``` + */ +import createClient from 'openapi-fetch'; +import type { paths } from './types'; + +export type { paths } from './types'; + +/** + * Create a new API client instance + * + * @param options - Client configuration options + * @param options.baseUrl - Base URL for the API (default: http://localhost:3000) + * @param options.headers - Default headers to include with every request + * @returns Type-safe API client + */ +export default function createPortalDBClient(options?: { + baseUrl?: string; + headers?: HeadersInit; +}) { + return createClient({ + baseUrl: options?.baseUrl || 'http://localhost:3000', + headers: options?.headers, + }); +} + +// Re-export for convenience +export { createClient }; +EOF +fi + # Create tsconfig.json if it doesn't exist if [ ! -f "tsconfig.json" ]; then echo "๐Ÿ”ง Creating tsconfig.json..." @@ -269,10 +295,9 @@ if [ ! -f "tsconfig.json" ]; then "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "declaration": true, - "declarationMap": true, - "outDir": "./dist" + "declarationMap": true }, - "include": ["src/**/*", "models/**/*", "apis/**/*"], + "include": ["*.ts"], "exclude": ["node_modules", "dist"] } EOF @@ -280,19 +305,17 @@ fi echo -e "${GREEN}โœ… TypeScript module setup completed${NC}" -# Test TypeScript compilation if TypeScript is available -if command -v tsc >/dev/null 2>&1; then - echo "๐Ÿ” Validating TypeScript compilation..." - if ! npx tsc --noEmit; then - echo -e "${YELLOW}โš ๏ธ TypeScript compilation check failed, but types were generated${NC}" - echo " This may be due to missing dependencies or configuration issues" - echo " The generated types.ts file should still be usable" +# Install dependencies if package-lock.json doesn't exist +if [ ! -f "package-lock.json" ]; then + echo "๐Ÿ“ฆ Installing dependencies..." + if npm install; then + echo -e "${GREEN}โœ… Dependencies installed successfully${NC}" else - echo -e "${GREEN}โœ… TypeScript types validate successfully${NC}" + echo -e "${YELLOW}โš ๏ธ Failed to install dependencies, but SDK was generated${NC}" + echo " Run 'npm install' in $TS_OUTPUT_DIR to install dependencies" fi else - echo -e "${YELLOW}โš ๏ธ TypeScript not found, skipping compilation validation${NC}" - echo " Install TypeScript globally: npm install -g typescript" + echo -e "${GREEN}โœ… Dependencies already installed${NC}" fi # Return to scripts directory @@ -321,13 +344,12 @@ echo " โ€ข README.md - Documentation (permanent)" echo "" echo -e "${BLUE}๐Ÿ”ท TypeScript SDK:${NC}" echo " Package: @grove/portal-db-sdk" -echo " Runtime: Zero dependencies (uses native fetch)" +echo " Runtime: openapi-fetch (minimal dependency, uses native fetch)" echo " Files:" -echo " โ€ข apis/ - Generated API client classes (updated)" -echo " โ€ข models/ - Generated TypeScript models (updated)" +echo " โ€ข types.ts - Generated TypeScript types from OpenAPI spec (updated)" +echo " โ€ข client.ts - Typed fetch client wrapper (permanent)" echo " โ€ข package.json - Node.js package definition (permanent)" echo " โ€ข tsconfig.json - TypeScript configuration (permanent)" -echo " โ€ข README.md - Documentation (permanent)" echo "" echo -e "${BLUE}๐Ÿ“š API Documentation:${NC}" echo " โ€ข openapi.json - OpenAPI 3.x specification (updated)" @@ -341,18 +363,20 @@ echo " 3. Import in your project: go get github.com/buildwithgrove/path/portal echo " 4. Check documentation: cat $GO_OUTPUT_DIR/README.md" echo "" echo -e "${BLUE}TypeScript SDK:${NC}" -echo " 1. Review generated APIs: ls $TS_OUTPUT_DIR/apis/" -echo " 2. Review generated models: ls $TS_OUTPUT_DIR/models/" -echo " 3. Copy to your React project or publish as npm package" -echo " 4. Import client: import { DefaultApi } from './apis'" -echo " 5. Use built-in methods: await client.portalApplicationsGet()" -echo " 6. Check documentation: cat $TS_OUTPUT_DIR/README.md" +echo " 1. Review generated types: cat $TS_OUTPUT_DIR/types.ts | head -50" +echo " 2. Review client wrapper: cat $TS_OUTPUT_DIR/client.ts" +echo " 3. Copy to your project or publish as npm package" +echo " 4. Import client: import createClient from './client'" +echo " 5. Use with type safety:" +echo " const client = createClient({ baseUrl: 'http://localhost:3000' });" +echo " const { data, error } = await client.GET('/portal_accounts');" echo "" echo -e "${BLUE}๐Ÿ’ก Tips:${NC}" echo " โ€ข Go: Full client with methods, types separated for readability" -echo " โ€ข TypeScript: Auto-generated client classes with built-in methods" +echo " โ€ข TypeScript: openapi-fetch provides full type safety with minimal overhead" echo " โ€ข Both SDKs update automatically when you run this script" echo " โ€ข Run after database schema changes to stay in sync" -echo " โ€ข TypeScript SDK has zero runtime dependencies" +echo " โ€ข TypeScript SDK uses openapi-fetch (1 dependency, tree-shakeable)" +echo " โ€ข All request/response types are inferred from the OpenAPI spec" echo "" echo -e "${GREEN}โœจ Happy coding!${NC}" \ No newline at end of file diff --git a/portal-db/api/scripts/postgrest-gen-jwt.sh b/portal-db/api/scripts/postgrest-gen-jwt.sh index a97c0f0e9..78a08d35d 100755 --- a/portal-db/api/scripts/postgrest-gen-jwt.sh +++ b/portal-db/api/scripts/postgrest-gen-jwt.sh @@ -9,8 +9,10 @@ # Reference: https://docs.postgrest.org/en/v13/tutorials/tut1.html # # Usage: -# ./postgrest-gen-jwt.sh # portal_db_admin role, sample email +# ./postgrest-gen-jwt.sh # portal_db_admin role, sample email, 1h expiry # ./postgrest-gen-jwt.sh portal_db_reader user@email # custom role + email +# ./postgrest-gen-jwt.sh --expires 24h # 24 hour expiry +# ./postgrest-gen-jwt.sh --expires never # Never expires # ./postgrest-gen-jwt.sh --token-only portal_db_admin user@email # ./postgrest-gen-jwt.sh --help # display usage information @@ -28,27 +30,48 @@ RESET='\033[0m' # TODO_PRODUCTION: Extract JWT_SECRET from postgrest.conf automatically to maintain single source of truth and avoid drift between files JWT_SECRET="${JWT_SECRET:-supersecretjwtsecretforlocaldevelopment123456789}" -# Parse arguments -ROLE="${1:-portal_db_admin}" -EMAIL="${2:-john@doe.com}" +# Default values +ROLE="portal_db_admin" +EMAIL="john@doe.com" +EXPIRES="1h" TOKEN_ONLY=false -# Check for --token-only flag -if [[ "$1" == "--token-only" ]]; then - TOKEN_ONLY=true - ROLE="${2:-portal_db_admin}" - EMAIL="${3:-john@doe.com}" -fi +# Parse arguments +while [[ $# -gt 0 ]]; do + case "$1" in + --token-only) + TOKEN_ONLY=true + shift + ;; + --expires) + EXPIRES="$2" + shift 2 + ;; + --help|-h) + print_help + exit 0 + ;; + *) + if [[ -z "$ROLE" || "$ROLE" == "portal_db_admin" ]]; then + ROLE="$1" + elif [[ "$EMAIL" == "john@doe.com" ]]; then + EMAIL="$1" + fi + shift + ;; + esac +done # Show help print_help() { cat <<'EOF' -Usage: postgrest-gen-jwt.sh [ROLE] [EMAIL] +Usage: postgrest-gen-jwt.sh [OPTIONS] [ROLE] [EMAIL] Options: --help, -h Show this help message and exit - --token-only ROLE [EMAIL] - Print only the JWT for scripting + --token-only Print only the JWT for scripting + --expires DURATION Set token expiration (default: 1h) + Examples: 1h, 24h, 7d, 30d, never Role aliases: admin Shortcut for portal_db_admin @@ -58,18 +81,32 @@ Positional arguments: ROLE Database role to embed in the JWT (default: portal_db_admin) EMAIL Email claim to embed in the JWT (default: john@doe.com) +Expiration formats: + 1h, 2h, etc. Hours (e.g., 1h = 1 hour from now) + 1d, 7d, 30d Days (e.g., 7d = 7 days from now) + never Token never expires (no exp claim) + Examples: + # Generate token with default 1 hour expiry ./postgrest-gen-jwt.sh + + # Generate token with custom role and email ./postgrest-gen-jwt.sh reader user@example.com - ./postgrest-gen-jwt.sh --token-only admin + + # Generate token that expires in 24 hours + ./postgrest-gen-jwt.sh --expires 24h + + # Generate token that expires in 7 days + ./postgrest-gen-jwt.sh --expires 7d admin user@example.com + + # Generate token that never expires + ./postgrest-gen-jwt.sh --expires never + + # Generate token for scripting (token only output) + ./postgrest-gen-jwt.sh --token-only --expires never admin EOF } -if [[ "$ROLE" == "--help" || "$ROLE" == "-h" ]]; then - print_help - exit 0 -fi - # Allow short aliases for role names translate_role() { case "$1" in @@ -88,8 +125,41 @@ translate_role() { # Map alias after parsing the arguments ROLE=$(translate_role "$ROLE") -# Calculate expiration (1 hour from now) -EXP=$(date -v+1H +%s 2>/dev/null || date -d '+1 hour' +%s 2>/dev/null) +# Calculate expiration based on EXPIRES value +calculate_expiration() { + local duration="$1" + + if [[ "$duration" == "never" ]]; then + echo "never" + return + fi + + # Extract number and unit (e.g., "24h" -> 24 and h) + local num="${duration//[^0-9]/}" + local unit="${duration//[0-9]/}" + + # Default to hours if no unit specified + if [[ -z "$unit" ]]; then + unit="h" + fi + + case "$unit" in + h) + # Hours + date -v+${num}H +%s 2>/dev/null || date -d "+${num} hours" +%s 2>/dev/null + ;; + d) + # Days + date -v+${num}d +%s 2>/dev/null || date -d "+${num} days" +%s 2>/dev/null + ;; + *) + echo "Error: Invalid expiration format '$duration'. Use format like: 1h, 24h, 7d, or 'never'" >&2 + exit 1 + ;; + esac +} + +EXP=$(calculate_expiration "$EXPIRES") # ============================================================================ # JWT Generation @@ -102,7 +172,14 @@ base64url() { # Create JWT components HEADER=$(echo -n '{"alg":"HS256","typ":"JWT"}' | base64url) -PAYLOAD=$(echo -n "{\"role\":\"$ROLE\",\"email\":\"$EMAIL\",\"aud\":\"postgrest\",\"exp\":$EXP}" | base64url) + +# Create payload with or without exp claim +if [[ "$EXP" == "never" ]]; then + PAYLOAD=$(echo -n "{\"role\":\"$ROLE\",\"email\":\"$EMAIL\",\"aud\":\"postgrest\"}" | base64url) +else + PAYLOAD=$(echo -n "{\"role\":\"$ROLE\",\"email\":\"$EMAIL\",\"aud\":\"postgrest\",\"exp\":$EXP}" | base64url) +fi + SIGNATURE=$(echo -n "$HEADER.$PAYLOAD" | openssl dgst -sha256 -hmac "$JWT_SECRET" -binary | base64url) # Complete JWT token @@ -121,7 +198,13 @@ else echo -e "${GREEN}${BOLD}=======================${RESET}" echo -e "${BOLD}Role:${RESET} ${BLUE}$ROLE${RESET}" echo -e "${BOLD}Email:${RESET} ${BLUE}$EMAIL${RESET}" - echo -e "${BOLD}Expires:${RESET} ${BLUE}$(date -r $EXP 2>/dev/null || date -d @$EXP 2>/dev/null)${RESET}" + + if [[ "$EXP" == "never" ]]; then + echo -e "${BOLD}Expires:${RESET} ${YELLOW}Never (no expiration)${RESET}" + else + echo -e "${BOLD}Expires:${RESET} ${BLUE}$(date -r $EXP 2>/dev/null || date -d @$EXP 2>/dev/null)${RESET} ${CYAN}($EXPIRES)${RESET}" + fi + echo "" echo -e "${BOLD}Token:${RESET}" echo -e "${YELLOW}$JWT_TOKEN${RESET}" diff --git a/portal-db/sdk/typescript/.gitignore b/portal-db/sdk/typescript/.gitignore deleted file mode 100644 index 149b57654..000000000 --- a/portal-db/sdk/typescript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/portal-db/sdk/typescript/.npmignore b/portal-db/sdk/typescript/.npmignore deleted file mode 100644 index 42061c01a..000000000 --- a/portal-db/sdk/typescript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/portal-db/sdk/typescript/.openapi-generator-ignore b/portal-db/sdk/typescript/.openapi-generator-ignore deleted file mode 100644 index 7484ee590..000000000 --- a/portal-db/sdk/typescript/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/portal-db/sdk/typescript/.openapi-generator/FILES b/portal-db/sdk/typescript/.openapi-generator/FILES deleted file mode 100644 index 4bdf57113..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/FILES +++ /dev/null @@ -1,42 +0,0 @@ -.gitignore -.npmignore -README.md -package.json -src/apis/IntrospectionApi.ts -src/apis/NetworksApi.ts -src/apis/OrganizationsApi.ts -src/apis/PortalAccountRbacApi.ts -src/apis/PortalAccountsApi.ts -src/apis/PortalApplicationRbacApi.ts -src/apis/PortalApplicationsApi.ts -src/apis/PortalPlansApi.ts -src/apis/PortalUsersApi.ts -src/apis/PortalWorkersAccountDataApi.ts -src/apis/RpcArmorApi.ts -src/apis/RpcDearmorApi.ts -src/apis/RpcGenRandomUuidApi.ts -src/apis/RpcGenSaltApi.ts -src/apis/RpcPgpArmorHeadersApi.ts -src/apis/RpcPgpKeyIdApi.ts -src/apis/ServiceEndpointsApi.ts -src/apis/ServiceFallbacksApi.ts -src/apis/ServicesApi.ts -src/apis/index.ts -src/index.ts -src/models/Networks.ts -src/models/Organizations.ts -src/models/PortalAccountRbac.ts -src/models/PortalAccounts.ts -src/models/PortalApplicationRbac.ts -src/models/PortalApplications.ts -src/models/PortalPlans.ts -src/models/PortalUsers.ts -src/models/PortalWorkersAccountData.ts -src/models/RpcArmorPostRequest.ts -src/models/RpcGenSaltPostRequest.ts -src/models/ServiceEndpoints.ts -src/models/ServiceFallbacks.ts -src/models/Services.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/portal-db/sdk/typescript/.openapi-generator/VERSION b/portal-db/sdk/typescript/.openapi-generator/VERSION deleted file mode 100644 index e465da431..000000000 --- a/portal-db/sdk/typescript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.14.0 diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 4e066a339..97892e69c 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1,46 +1,57 @@ -## @grove/portal-db-sdk@12.0.2 (a4e00ff) +# Portal DB TypeScript SDK -This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: +Type-safe TypeScript client for the Portal DB API, generated from OpenAPI specification using [openapi-typescript](https://github.com/openapi-ts/openapi-typescript) and [openapi-fetch](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch). -Environment -* Node.js -* Webpack -* Browserify +## Installation -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build +```bash +npm install openapi-fetch ``` -### Publishing +## Usage -First build the package then run `npm publish` +### Basic GET Request -### Consuming +```typescript +import createClient from 'openapi-fetch'; +import type { paths } from './types'; -navigate to the folder of your consuming project and run one of the following commands. +const client = createClient({ + baseUrl: 'http://localhost:3000', + headers: { + 'Authorization': `Bearer ${JWT_TOKEN}`, + }, +}); -_published:_ +// Fetch all services +const { data, error } = await client.GET('/services'); +if (error) { + console.error('Error:', error); +} else { + console.log('Services:', data); +} ``` -npm install @grove/portal-db-sdk@12.0.2 (a4e00ff) --save + +### Query with Filters + +```typescript +// GET with PostgREST filters +const { data, error } = await client.GET('/services', { + params: { + query: { + active: 'eq.true', // Filter: active = true + service_id: 'like.*ethereum*', // Pattern match + } + } +}); ``` -_unPublished (not recommended):_ +## Documentation -``` -npm install PATH_TO_GENERATED_PACKAGE --save -``` +- **openapi-fetch**: https://openapi-ts.dev/openapi-fetch/ +- **PostgREST API Reference**: https://postgrest.org/en/stable/references/api/tables_views.html + +## Type Safety + +All endpoints, parameters, and responses are fully typed based on the OpenAPI specification. TypeScript will provide autocomplete and catch errors at compile time. diff --git a/portal-db/sdk/typescript/client.ts b/portal-db/sdk/typescript/client.ts new file mode 100644 index 000000000..189af685d --- /dev/null +++ b/portal-db/sdk/typescript/client.ts @@ -0,0 +1,49 @@ +/** + * Grove Portal DB API Client + * + * This client uses openapi-fetch for type-safe API requests. + * It's lightweight with zero dependencies beyond native fetch. + * + * @example + * ```typescript + * import createClient from './client'; + * + * const client = createClient({ baseUrl: 'http://localhost:3000' }); + * + * // GET request with full type safety + * const { data, error } = await client.GET('/portal_accounts'); + * + * // POST request with typed body + * const { data, error } = await client.POST('/portal_accounts', { + * body: { + * portal_plan_type: 'PLAN_FREE', + * // ... other fields + * } + * }); + * ``` + */ +import createClient from 'openapi-fetch'; +import type { paths } from './types'; + +export type { paths } from './types'; + +/** + * Create a new API client instance + * + * @param options - Client configuration options + * @param options.baseUrl - Base URL for the API (default: http://localhost:3000) + * @param options.headers - Default headers to include with every request + * @returns Type-safe API client + */ +export default function createPortalDBClient(options?: { + baseUrl?: string; + headers?: HeadersInit; +}) { + return createClient({ + baseUrl: options?.baseUrl || 'http://localhost:3000', + headers: options?.headers, + }); +} + +// Re-export for convenience +export { createClient }; diff --git a/portal-db/sdk/typescript/package-lock.json b/portal-db/sdk/typescript/package-lock.json new file mode 100644 index 000000000..9bd9e0214 --- /dev/null +++ b/portal-db/sdk/typescript/package-lock.json @@ -0,0 +1,406 @@ +{ + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@grove/portal-db-sdk", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "openapi-fetch": "^0.12.2" + }, + "devDependencies": { + "openapi-typescript": "^7.4.3", + "typescript": "^5.0.0" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@redocly/ajv": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.3.tgz", + "integrity": "sha512-4P3iZse91TkBiY+Dx5DUgxQ9GXkVJf++cmI0MOyLDxV9b5MUBI4II6ES8zA5JCbO72nKAJxWrw4PUPW+YP3ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@redocly/config": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.34.5", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.5.tgz", + "integrity": "sha512-0EbE8LRbkogtcCXU7liAyC00n9uNG9hJ+eMyHFdUsy9lB/WGqnEBgwjA9q2cyzAVcdTkQqTBBU1XePNnN3OijA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/index-to-position": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", + "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/openapi-fetch": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.12.5.tgz", + "integrity": "sha512-FnAMWLt0MNL6ComcL4q/YbB1tUgyz5YnYtwA1+zlJ5xcucmK5RlWsgH1ynxmEeu8fGJkYjm8armU/HVpORc9lw==", + "license": "MIT", + "dependencies": { + "openapi-typescript-helpers": "^0.0.15" + } + }, + "node_modules/openapi-typescript": { + "version": "7.9.1", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.9.1.tgz", + "integrity": "sha512-9gJtoY04mk6iPMbToPjPxEAtfXZ0dTsMZtsgUI8YZta0btPPig9DJFP4jlerQD/7QOwYgb0tl+zLUpDf7vb7VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redocly/openapi-core": "^1.34.5", + "ansi-colors": "^4.1.3", + "change-case": "^5.4.4", + "parse-json": "^8.3.0", + "supports-color": "^10.1.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/openapi-typescript-helpers": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.15.tgz", + "integrity": "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==", + "license": "MIT" + }, + "node_modules/parse-json": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", + "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "index-to-position": "^1.1.0", + "type-fest": "^4.39.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/yaml-ast-parser": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/portal-db/sdk/typescript/package.json b/portal-db/sdk/typescript/package.json index 2cbb1e8a2..e05ddc7eb 100644 --- a/portal-db/sdk/typescript/package.json +++ b/portal-db/sdk/typescript/package.json @@ -1,19 +1,24 @@ { "name": "@grove/portal-db-sdk", - "version": "12.0.2 (a4e00ff)", - "description": "OpenAPI client for @grove/portal-db-sdk", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", + "version": "1.0.0", + "description": "TypeScript SDK for Grove Portal DB API", + "type": "module", + "main": "client.ts", + "types": "types.ts", "scripts": { - "build": "tsc", - "prepare": "npm run build" + "type-check": "tsc --noEmit" + }, + "keywords": ["grove", "portal", "db", "api", "sdk", "typescript"], + "author": "Grove Team", + "license": "MIT", + "dependencies": { + "openapi-fetch": "^0.12.2" }, "devDependencies": { - "typescript": "^4.0 || ^5.0" + "typescript": "^5.0.0", + "openapi-typescript": "^7.4.3" + }, + "peerDependencies": { + "typescript": ">=5.0.0" } } diff --git a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts b/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts deleted file mode 100644 index b654b5e25..000000000 --- a/portal-db/sdk/typescript/src/apis/IntrospectionApi.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -/** - * - */ -export class IntrospectionApi extends runtime.BaseAPI { - - /** - * OpenAPI description (this document) - */ - async rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * OpenAPI description (this document) - */ - async rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rootGetRaw(initOverrides); - } - -} diff --git a/portal-db/sdk/typescript/src/apis/NetworksApi.ts b/portal-db/sdk/typescript/src/apis/NetworksApi.ts deleted file mode 100644 index 7ed2eea64..000000000 --- a/portal-db/sdk/typescript/src/apis/NetworksApi.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Networks, -} from '../models/index'; -import { - NetworksFromJSON, - NetworksToJSON, -} from '../models/index'; - -export interface NetworksDeleteRequest { - networkId?: string; - prefer?: NetworksDeletePreferEnum; -} - -export interface NetworksGetRequest { - networkId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: NetworksGetPreferEnum; -} - -export interface NetworksPatchRequest { - networkId?: string; - prefer?: NetworksPatchPreferEnum; - networks?: Networks; -} - -export interface NetworksPostRequest { - select?: string; - prefer?: NetworksPostPreferEnum; - networks?: Networks; -} - -/** - * - */ -export class NetworksApi extends runtime.BaseAPI { - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDeleteRaw(requestParameters: NetworksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksDelete(requestParameters: NetworksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGetRaw(requestParameters: NetworksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworksFromJSON)); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksGet(requestParameters: NetworksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.networksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatchRaw(requestParameters: NetworksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPatch(requestParameters: NetworksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPostRaw(requestParameters: NetworksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/networks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworksToJSON(requestParameters['networks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - */ - async networksPost(requestParameters: NetworksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const NetworksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksDeletePreferEnum = typeof NetworksDeletePreferEnum[keyof typeof NetworksDeletePreferEnum]; -/** - * @export - */ -export const NetworksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type NetworksGetPreferEnum = typeof NetworksGetPreferEnum[keyof typeof NetworksGetPreferEnum]; -/** - * @export - */ -export const NetworksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type NetworksPatchPreferEnum = typeof NetworksPatchPreferEnum[keyof typeof NetworksPatchPreferEnum]; -/** - * @export - */ -export const NetworksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type NetworksPostPreferEnum = typeof NetworksPostPreferEnum[keyof typeof NetworksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts b/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts deleted file mode 100644 index 9944fa2cd..000000000 --- a/portal-db/sdk/typescript/src/apis/OrganizationsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Organizations, -} from '../models/index'; -import { - OrganizationsFromJSON, - OrganizationsToJSON, -} from '../models/index'; - -export interface OrganizationsDeleteRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsDeletePreferEnum; -} - -export interface OrganizationsGetRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: OrganizationsGetPreferEnum; -} - -export interface OrganizationsPatchRequest { - organizationId?: number; - organizationName?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: OrganizationsPatchPreferEnum; - organizations?: Organizations; -} - -export interface OrganizationsPostRequest { - select?: string; - prefer?: OrganizationsPostPreferEnum; - organizations?: Organizations; -} - -/** - * - */ -export class OrganizationsApi extends runtime.BaseAPI { - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDeleteRaw(requestParameters: OrganizationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsDelete(requestParameters: OrganizationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGetRaw(requestParameters: OrganizationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationsFromJSON)); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsGet(requestParameters: OrganizationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.organizationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatchRaw(requestParameters: OrganizationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['organizationName'] != null) { - queryParameters['organization_name'] = requestParameters['organizationName']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPatch(requestParameters: OrganizationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPostRaw(requestParameters: OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OrganizationsToJSON(requestParameters['organizations']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Companies or customer groups that can be attached to Portal Accounts - */ - async organizationsPost(requestParameters: OrganizationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.organizationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const OrganizationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsDeletePreferEnum = typeof OrganizationsDeletePreferEnum[keyof typeof OrganizationsDeletePreferEnum]; -/** - * @export - */ -export const OrganizationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type OrganizationsGetPreferEnum = typeof OrganizationsGetPreferEnum[keyof typeof OrganizationsGetPreferEnum]; -/** - * @export - */ -export const OrganizationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type OrganizationsPatchPreferEnum = typeof OrganizationsPatchPreferEnum[keyof typeof OrganizationsPatchPreferEnum]; -/** - * @export - */ -export const OrganizationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type OrganizationsPostPreferEnum = typeof OrganizationsPostPreferEnum[keyof typeof OrganizationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts deleted file mode 100644 index 79587e887..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccountRbac, -} from '../models/index'; -import { - PortalAccountRbacFromJSON, - PortalAccountRbacToJSON, -} from '../models/index'; - -export interface PortalAccountRbacDeleteRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacDeletePreferEnum; -} - -export interface PortalAccountRbacGetRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountRbacGetPreferEnum; -} - -export interface PortalAccountRbacPatchRequest { - id?: number; - portalAccountId?: string; - portalUserId?: string; - roleName?: string; - userJoinedAccount?: boolean; - prefer?: PortalAccountRbacPatchPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -export interface PortalAccountRbacPostRequest { - select?: string; - prefer?: PortalAccountRbacPostPreferEnum; - portalAccountRbac?: PortalAccountRbac; -} - -/** - * - */ -export class PortalAccountRbacApi extends runtime.BaseAPI { - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDeleteRaw(requestParameters: PortalAccountRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacDelete(requestParameters: PortalAccountRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGetRaw(requestParameters: PortalAccountRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountRbacFromJSON)); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacGet(requestParameters: PortalAccountRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatchRaw(requestParameters: PortalAccountRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['roleName'] != null) { - queryParameters['role_name'] = requestParameters['roleName']; - } - - if (requestParameters['userJoinedAccount'] != null) { - queryParameters['user_joined_account'] = requestParameters['userJoinedAccount']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPatch(requestParameters: PortalAccountRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPostRaw(requestParameters: PortalAccountRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_account_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountRbacToJSON(requestParameters['portalAccountRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User roles and permissions for specific portal accounts - */ - async portalAccountRbacPost(requestParameters: PortalAccountRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacDeletePreferEnum = typeof PortalAccountRbacDeletePreferEnum[keyof typeof PortalAccountRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountRbacGetPreferEnum = typeof PortalAccountRbacGetPreferEnum[keyof typeof PortalAccountRbacGetPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountRbacPatchPreferEnum = typeof PortalAccountRbacPatchPreferEnum[keyof typeof PortalAccountRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountRbacPostPreferEnum = typeof PortalAccountRbacPostPreferEnum[keyof typeof PortalAccountRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts b/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts deleted file mode 100644 index f7db3d925..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalAccountsApi.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalAccounts, -} from '../models/index'; -import { - PortalAccountsFromJSON, - PortalAccountsToJSON, -} from '../models/index'; - -export interface PortalAccountsDeleteRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsDeletePreferEnum; -} - -export interface PortalAccountsGetRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalAccountsGetPreferEnum; -} - -export interface PortalAccountsPatchRequest { - portalAccountId?: string; - organizationId?: number; - portalPlanType?: string; - userAccountName?: string; - internalAccountName?: string; - portalAccountUserLimit?: number; - portalAccountUserLimitInterval?: string; - portalAccountUserLimitRps?: number; - billingType?: string; - stripeSubscriptionId?: string; - gcpAccountId?: string; - gcpEntitlementId?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalAccountsPatchPreferEnum; - portalAccounts?: PortalAccounts; -} - -export interface PortalAccountsPostRequest { - select?: string; - prefer?: PortalAccountsPostPreferEnum; - portalAccounts?: PortalAccounts; -} - -/** - * - */ -export class PortalAccountsApi extends runtime.BaseAPI { - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDeleteRaw(requestParameters: PortalAccountsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsDelete(requestParameters: PortalAccountsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGetRaw(requestParameters: PortalAccountsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalAccountsFromJSON)); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsGet(requestParameters: PortalAccountsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalAccountsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatchRaw(requestParameters: PortalAccountsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['organizationId'] != null) { - queryParameters['organization_id'] = requestParameters['organizationId']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['internalAccountName'] != null) { - queryParameters['internal_account_name'] = requestParameters['internalAccountName']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['portalAccountUserLimitInterval'] != null) { - queryParameters['portal_account_user_limit_interval'] = requestParameters['portalAccountUserLimitInterval']; - } - - if (requestParameters['portalAccountUserLimitRps'] != null) { - queryParameters['portal_account_user_limit_rps'] = requestParameters['portalAccountUserLimitRps']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['stripeSubscriptionId'] != null) { - queryParameters['stripe_subscription_id'] = requestParameters['stripeSubscriptionId']; - } - - if (requestParameters['gcpAccountId'] != null) { - queryParameters['gcp_account_id'] = requestParameters['gcpAccountId']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPatch(requestParameters: PortalAccountsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPatchRaw(requestParameters, initOverrides); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPostRaw(requestParameters: PortalAccountsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_accounts`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalAccountsToJSON(requestParameters['portalAccounts']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Multi-tenant accounts with plans and billing integration - */ - async portalAccountsPost(requestParameters: PortalAccountsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalAccountsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalAccountsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsDeletePreferEnum = typeof PortalAccountsDeletePreferEnum[keyof typeof PortalAccountsDeletePreferEnum]; -/** - * @export - */ -export const PortalAccountsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalAccountsGetPreferEnum = typeof PortalAccountsGetPreferEnum[keyof typeof PortalAccountsGetPreferEnum]; -/** - * @export - */ -export const PortalAccountsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalAccountsPatchPreferEnum = typeof PortalAccountsPatchPreferEnum[keyof typeof PortalAccountsPatchPreferEnum]; -/** - * @export - */ -export const PortalAccountsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalAccountsPostPreferEnum = typeof PortalAccountsPostPreferEnum[keyof typeof PortalAccountsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts deleted file mode 100644 index 05f0a6095..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationRbacApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplicationRbac, -} from '../models/index'; -import { - PortalApplicationRbacFromJSON, - PortalApplicationRbacToJSON, -} from '../models/index'; - -export interface PortalApplicationRbacDeleteRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacDeletePreferEnum; -} - -export interface PortalApplicationRbacGetRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationRbacGetPreferEnum; -} - -export interface PortalApplicationRbacPatchRequest { - id?: number; - portalApplicationId?: string; - portalUserId?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationRbacPatchPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -export interface PortalApplicationRbacPostRequest { - select?: string; - prefer?: PortalApplicationRbacPostPreferEnum; - portalApplicationRbac?: PortalApplicationRbac; -} - -/** - * - */ -export class PortalApplicationRbacApi extends runtime.BaseAPI { - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDeleteRaw(requestParameters: PortalApplicationRbacDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacDelete(requestParameters: PortalApplicationRbacDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacDeleteRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGetRaw(requestParameters: PortalApplicationRbacGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationRbacFromJSON)); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacGet(requestParameters: PortalApplicationRbacGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationRbacGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatchRaw(requestParameters: PortalApplicationRbacPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['id'] != null) { - queryParameters['id'] = requestParameters['id']; - } - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPatch(requestParameters: PortalApplicationRbacPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPatchRaw(requestParameters, initOverrides); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPostRaw(requestParameters: PortalApplicationRbacPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_application_rbac`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationRbacToJSON(requestParameters['portalApplicationRbac']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * User access controls for specific applications - */ - async portalApplicationRbacPost(requestParameters: PortalApplicationRbacPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationRbacPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationRbacDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacDeletePreferEnum = typeof PortalApplicationRbacDeletePreferEnum[keyof typeof PortalApplicationRbacDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationRbacGetPreferEnum = typeof PortalApplicationRbacGetPreferEnum[keyof typeof PortalApplicationRbacGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationRbacPatchPreferEnum = typeof PortalApplicationRbacPatchPreferEnum[keyof typeof PortalApplicationRbacPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationRbacPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationRbacPostPreferEnum = typeof PortalApplicationRbacPostPreferEnum[keyof typeof PortalApplicationRbacPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts b/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts deleted file mode 100644 index 4161669cc..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalApplicationsApi.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalApplications, -} from '../models/index'; -import { - PortalApplicationsFromJSON, - PortalApplicationsToJSON, -} from '../models/index'; - -export interface PortalApplicationsDeleteRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsDeletePreferEnum; -} - -export interface PortalApplicationsGetRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalApplicationsGetPreferEnum; -} - -export interface PortalApplicationsPatchRequest { - portalApplicationId?: string; - portalAccountId?: string; - portalApplicationName?: string; - emoji?: string; - portalApplicationUserLimit?: number; - portalApplicationUserLimitInterval?: string; - portalApplicationUserLimitRps?: number; - portalApplicationDescription?: string; - favoriteServiceIds?: string; - secretKeyHash?: string; - secretKeyRequired?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalApplicationsPatchPreferEnum; - portalApplications?: PortalApplications; -} - -export interface PortalApplicationsPostRequest { - select?: string; - prefer?: PortalApplicationsPostPreferEnum; - portalApplications?: PortalApplications; -} - -/** - * - */ -export class PortalApplicationsApi extends runtime.BaseAPI { - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDeleteRaw(requestParameters: PortalApplicationsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsDelete(requestParameters: PortalApplicationsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGetRaw(requestParameters: PortalApplicationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalApplicationsFromJSON)); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsGet(requestParameters: PortalApplicationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalApplicationsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatchRaw(requestParameters: PortalApplicationsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalApplicationId'] != null) { - queryParameters['portal_application_id'] = requestParameters['portalApplicationId']; - } - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['portalApplicationName'] != null) { - queryParameters['portal_application_name'] = requestParameters['portalApplicationName']; - } - - if (requestParameters['emoji'] != null) { - queryParameters['emoji'] = requestParameters['emoji']; - } - - if (requestParameters['portalApplicationUserLimit'] != null) { - queryParameters['portal_application_user_limit'] = requestParameters['portalApplicationUserLimit']; - } - - if (requestParameters['portalApplicationUserLimitInterval'] != null) { - queryParameters['portal_application_user_limit_interval'] = requestParameters['portalApplicationUserLimitInterval']; - } - - if (requestParameters['portalApplicationUserLimitRps'] != null) { - queryParameters['portal_application_user_limit_rps'] = requestParameters['portalApplicationUserLimitRps']; - } - - if (requestParameters['portalApplicationDescription'] != null) { - queryParameters['portal_application_description'] = requestParameters['portalApplicationDescription']; - } - - if (requestParameters['favoriteServiceIds'] != null) { - queryParameters['favorite_service_ids'] = requestParameters['favoriteServiceIds']; - } - - if (requestParameters['secretKeyHash'] != null) { - queryParameters['secret_key_hash'] = requestParameters['secretKeyHash']; - } - - if (requestParameters['secretKeyRequired'] != null) { - queryParameters['secret_key_required'] = requestParameters['secretKeyRequired']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPatch(requestParameters: PortalApplicationsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPatchRaw(requestParameters, initOverrides); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPostRaw(requestParameters: PortalApplicationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_applications`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalApplicationsToJSON(requestParameters['portalApplications']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Applications created within portal accounts with their own rate limits and settings - */ - async portalApplicationsPost(requestParameters: PortalApplicationsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalApplicationsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalApplicationsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsDeletePreferEnum = typeof PortalApplicationsDeletePreferEnum[keyof typeof PortalApplicationsDeletePreferEnum]; -/** - * @export - */ -export const PortalApplicationsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalApplicationsGetPreferEnum = typeof PortalApplicationsGetPreferEnum[keyof typeof PortalApplicationsGetPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalApplicationsPatchPreferEnum = typeof PortalApplicationsPatchPreferEnum[keyof typeof PortalApplicationsPatchPreferEnum]; -/** - * @export - */ -export const PortalApplicationsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalApplicationsPostPreferEnum = typeof PortalApplicationsPostPreferEnum[keyof typeof PortalApplicationsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts b/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts deleted file mode 100644 index 6400389ad..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalPlansApi.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalPlans, -} from '../models/index'; -import { - PortalPlansFromJSON, - PortalPlansToJSON, -} from '../models/index'; - -export interface PortalPlansDeleteRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansDeletePreferEnum; -} - -export interface PortalPlansGetRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalPlansGetPreferEnum; -} - -export interface PortalPlansPatchRequest { - portalPlanType?: string; - portalPlanTypeDescription?: string; - planUsageLimit?: number; - planUsageLimitInterval?: string; - planRateLimitRps?: number; - planApplicationLimit?: number; - prefer?: PortalPlansPatchPreferEnum; - portalPlans?: PortalPlans; -} - -export interface PortalPlansPostRequest { - select?: string; - prefer?: PortalPlansPostPreferEnum; - portalPlans?: PortalPlans; -} - -/** - * - */ -export class PortalPlansApi extends runtime.BaseAPI { - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDeleteRaw(requestParameters: PortalPlansDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansDelete(requestParameters: PortalPlansDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGetRaw(requestParameters: PortalPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalPlansFromJSON)); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansGet(requestParameters: PortalPlansGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalPlansGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatchRaw(requestParameters: PortalPlansPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['portalPlanTypeDescription'] != null) { - queryParameters['portal_plan_type_description'] = requestParameters['portalPlanTypeDescription']; - } - - if (requestParameters['planUsageLimit'] != null) { - queryParameters['plan_usage_limit'] = requestParameters['planUsageLimit']; - } - - if (requestParameters['planUsageLimitInterval'] != null) { - queryParameters['plan_usage_limit_interval'] = requestParameters['planUsageLimitInterval']; - } - - if (requestParameters['planRateLimitRps'] != null) { - queryParameters['plan_rate_limit_rps'] = requestParameters['planRateLimitRps']; - } - - if (requestParameters['planApplicationLimit'] != null) { - queryParameters['plan_application_limit'] = requestParameters['planApplicationLimit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPatch(requestParameters: PortalPlansPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPatchRaw(requestParameters, initOverrides); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPostRaw(requestParameters: PortalPlansPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_plans`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalPlansToJSON(requestParameters['portalPlans']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available subscription plans for Portal Accounts - */ - async portalPlansPost(requestParameters: PortalPlansPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalPlansPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalPlansDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansDeletePreferEnum = typeof PortalPlansDeletePreferEnum[keyof typeof PortalPlansDeletePreferEnum]; -/** - * @export - */ -export const PortalPlansGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalPlansGetPreferEnum = typeof PortalPlansGetPreferEnum[keyof typeof PortalPlansGetPreferEnum]; -/** - * @export - */ -export const PortalPlansPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalPlansPatchPreferEnum = typeof PortalPlansPatchPreferEnum[keyof typeof PortalPlansPatchPreferEnum]; -/** - * @export - */ -export const PortalPlansPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalPlansPostPreferEnum = typeof PortalPlansPostPreferEnum[keyof typeof PortalPlansPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts b/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts deleted file mode 100644 index 86027a28c..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalUsersApi.ts +++ /dev/null @@ -1,367 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalUsers, -} from '../models/index'; -import { - PortalUsersFromJSON, - PortalUsersToJSON, -} from '../models/index'; - -export interface PortalUsersDeleteRequest { - portalUserId?: string; - portalUserEmail?: string; - signedUp?: boolean; - portalAdmin?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalUsersDeletePreferEnum; -} - -export interface PortalUsersGetRequest { - portalUserId?: string; - portalUserEmail?: string; - signedUp?: boolean; - portalAdmin?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalUsersGetPreferEnum; -} - -export interface PortalUsersPatchRequest { - portalUserId?: string; - portalUserEmail?: string; - signedUp?: boolean; - portalAdmin?: boolean; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: PortalUsersPatchPreferEnum; - portalUsers?: PortalUsers; -} - -export interface PortalUsersPostRequest { - select?: string; - prefer?: PortalUsersPostPreferEnum; - portalUsers?: PortalUsers; -} - -/** - * - */ -export class PortalUsersApi extends runtime.BaseAPI { - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersDeleteRaw(requestParameters: PortalUsersDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['portalUserEmail'] != null) { - queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; - } - - if (requestParameters['signedUp'] != null) { - queryParameters['signed_up'] = requestParameters['signedUp']; - } - - if (requestParameters['portalAdmin'] != null) { - queryParameters['portal_admin'] = requestParameters['portalAdmin']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_users`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersDelete(requestParameters: PortalUsersDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalUsersDeleteRaw(requestParameters, initOverrides); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersGetRaw(requestParameters: PortalUsersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['portalUserEmail'] != null) { - queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; - } - - if (requestParameters['signedUp'] != null) { - queryParameters['signed_up'] = requestParameters['signedUp']; - } - - if (requestParameters['portalAdmin'] != null) { - queryParameters['portal_admin'] = requestParameters['portalAdmin']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_users`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalUsersFromJSON)); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersGet(requestParameters: PortalUsersGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalUsersGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersPatchRaw(requestParameters: PortalUsersPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['portalUserId'] != null) { - queryParameters['portal_user_id'] = requestParameters['portalUserId']; - } - - if (requestParameters['portalUserEmail'] != null) { - queryParameters['portal_user_email'] = requestParameters['portalUserEmail']; - } - - if (requestParameters['signedUp'] != null) { - queryParameters['signed_up'] = requestParameters['signedUp']; - } - - if (requestParameters['portalAdmin'] != null) { - queryParameters['portal_admin'] = requestParameters['portalAdmin']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_users`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: PortalUsersToJSON(requestParameters['portalUsers']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersPatch(requestParameters: PortalUsersPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalUsersPatchRaw(requestParameters, initOverrides); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersPostRaw(requestParameters: PortalUsersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_users`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PortalUsersToJSON(requestParameters['portalUsers']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Users who can access the portal and belong to multiple accounts - */ - async portalUsersPost(requestParameters: PortalUsersPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.portalUsersPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const PortalUsersDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalUsersDeletePreferEnum = typeof PortalUsersDeletePreferEnum[keyof typeof PortalUsersDeletePreferEnum]; -/** - * @export - */ -export const PortalUsersGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalUsersGetPreferEnum = typeof PortalUsersGetPreferEnum[keyof typeof PortalUsersGetPreferEnum]; -/** - * @export - */ -export const PortalUsersPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type PortalUsersPatchPreferEnum = typeof PortalUsersPatchPreferEnum[keyof typeof PortalUsersPatchPreferEnum]; -/** - * @export - */ -export const PortalUsersPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type PortalUsersPostPreferEnum = typeof PortalUsersPostPreferEnum[keyof typeof PortalUsersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts b/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts deleted file mode 100644 index a933445cb..000000000 --- a/portal-db/sdk/typescript/src/apis/PortalWorkersAccountDataApi.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - PortalWorkersAccountData, -} from '../models/index'; -import { - PortalWorkersAccountDataFromJSON, - PortalWorkersAccountDataToJSON, -} from '../models/index'; - -export interface PortalWorkersAccountDataGetRequest { - portalAccountId?: string; - userAccountName?: string; - portalPlanType?: string; - billingType?: string; - portalAccountUserLimit?: number; - gcpEntitlementId?: string; - ownerEmail?: string; - ownerUserId?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: PortalWorkersAccountDataGetPreferEnum; -} - -/** - * - */ -export class PortalWorkersAccountDataApi extends runtime.BaseAPI { - - /** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' - */ - async portalWorkersAccountDataGetRaw(requestParameters: PortalWorkersAccountDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['portalAccountId'] != null) { - queryParameters['portal_account_id'] = requestParameters['portalAccountId']; - } - - if (requestParameters['userAccountName'] != null) { - queryParameters['user_account_name'] = requestParameters['userAccountName']; - } - - if (requestParameters['portalPlanType'] != null) { - queryParameters['portal_plan_type'] = requestParameters['portalPlanType']; - } - - if (requestParameters['billingType'] != null) { - queryParameters['billing_type'] = requestParameters['billingType']; - } - - if (requestParameters['portalAccountUserLimit'] != null) { - queryParameters['portal_account_user_limit'] = requestParameters['portalAccountUserLimit']; - } - - if (requestParameters['gcpEntitlementId'] != null) { - queryParameters['gcp_entitlement_id'] = requestParameters['gcpEntitlementId']; - } - - if (requestParameters['ownerEmail'] != null) { - queryParameters['owner_email'] = requestParameters['ownerEmail']; - } - - if (requestParameters['ownerUserId'] != null) { - queryParameters['owner_user_id'] = requestParameters['ownerUserId']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/portal_workers_account_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PortalWorkersAccountDataFromJSON)); - } - - /** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = \'PLAN_UNLIMITED\' AND billing_type = \'stripe\' - */ - async portalWorkersAccountDataGet(requestParameters: PortalWorkersAccountDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.portalWorkersAccountDataGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - -} - -/** - * @export - */ -export const PortalWorkersAccountDataGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type PortalWorkersAccountDataGetPreferEnum = typeof PortalWorkersAccountDataGetPreferEnum[keyof typeof PortalWorkersAccountDataGetPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts deleted file mode 100644 index 86b57d8ce..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcArmorApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcArmorPostRequest, -} from '../models/index'; -import { - RpcArmorPostRequestFromJSON, - RpcArmorPostRequestToJSON, -} from '../models/index'; - -export interface RpcArmorGetRequest { - : string; -} - -export interface RpcArmorPostOperationRequest { - rpcArmorPostRequest: RpcArmorPostRequest; - prefer?: RpcArmorPostOperationPreferEnum; -} - -/** - * - */ -export class RpcArmorApi extends runtime.BaseAPI { - - /** - */ - async rpcArmorGetRaw(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcArmorGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/armor`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcArmorGet(requestParameters: RpcArmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcArmorGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcArmorPostRaw(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcArmorPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcArmorPostRequest', - 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcArmorPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/armor`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcArmorPost(requestParameters: RpcArmorPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcArmorPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcArmorPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcArmorPostOperationPreferEnum = typeof RpcArmorPostOperationPreferEnum[keyof typeof RpcArmorPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts b/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts deleted file mode 100644 index 22c7d3980..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcDearmorApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcDearmorGetRequest { - : string; -} - -export interface RpcDearmorPostRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcDearmorPostPreferEnum; -} - -/** - * - */ -export class RpcDearmorApi extends runtime.BaseAPI { - - /** - */ - async rpcDearmorGetRaw(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcDearmorGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/dearmor`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcDearmorGet(requestParameters: RpcDearmorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcDearmorGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcDearmorPostRaw(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcDearmorPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/dearmor`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcDearmorPost(requestParameters: RpcDearmorPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcDearmorPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcDearmorPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcDearmorPostPreferEnum = typeof RpcDearmorPostPreferEnum[keyof typeof RpcDearmorPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts deleted file mode 100644 index f134d68a8..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcGenRandomUuidApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -export interface RpcGenRandomUuidPostRequest { - body: object; - prefer?: RpcGenRandomUuidPostPreferEnum; -} - -/** - * - */ -export class RpcGenRandomUuidApi extends runtime.BaseAPI { - - /** - */ - async rpcGenRandomUuidGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/gen_random_uuid`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenRandomUuidGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenRandomUuidGetRaw(initOverrides); - } - - /** - */ - async rpcGenRandomUuidPostRaw(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling rpcGenRandomUuidPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/gen_random_uuid`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'] as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenRandomUuidPost(requestParameters: RpcGenRandomUuidPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenRandomUuidPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcGenRandomUuidPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcGenRandomUuidPostPreferEnum = typeof RpcGenRandomUuidPostPreferEnum[keyof typeof RpcGenRandomUuidPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts b/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts deleted file mode 100644 index e8864684b..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcGenSaltApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcGenSaltGetRequest { - : string; -} - -export interface RpcGenSaltPostOperationRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcGenSaltPostOperationPreferEnum; -} - -/** - * - */ -export class RpcGenSaltApi extends runtime.BaseAPI { - - /** - */ - async rpcGenSaltGetRaw(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcGenSaltGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/gen_salt`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenSaltGet(requestParameters: RpcGenSaltGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenSaltGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcGenSaltPostRaw(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcGenSaltPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/gen_salt`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcGenSaltPost(requestParameters: RpcGenSaltPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcGenSaltPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcGenSaltPostOperationPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcGenSaltPostOperationPreferEnum = typeof RpcGenSaltPostOperationPreferEnum[keyof typeof RpcGenSaltPostOperationPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts deleted file mode 100644 index 7bf04ba44..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcPgpArmorHeadersApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcGenSaltPostRequest, -} from '../models/index'; -import { - RpcGenSaltPostRequestFromJSON, - RpcGenSaltPostRequestToJSON, -} from '../models/index'; - -export interface RpcPgpArmorHeadersGetRequest { - : string; -} - -export interface RpcPgpArmorHeadersPostRequest { - rpcGenSaltPostRequest: RpcGenSaltPostRequest; - prefer?: RpcPgpArmorHeadersPostPreferEnum; -} - -/** - * - */ -export class RpcPgpArmorHeadersApi extends runtime.BaseAPI { - - /** - */ - async rpcPgpArmorHeadersGetRaw(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcPgpArmorHeadersGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/pgp_armor_headers`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpArmorHeadersGet(requestParameters: RpcPgpArmorHeadersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpArmorHeadersGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcPgpArmorHeadersPostRaw(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcGenSaltPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcGenSaltPostRequest', - 'Required parameter "rpcGenSaltPostRequest" was null or undefined when calling rpcPgpArmorHeadersPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/pgp_armor_headers`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcGenSaltPostRequestToJSON(requestParameters['rpcGenSaltPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpArmorHeadersPost(requestParameters: RpcPgpArmorHeadersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpArmorHeadersPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcPgpArmorHeadersPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcPgpArmorHeadersPostPreferEnum = typeof RpcPgpArmorHeadersPostPreferEnum[keyof typeof RpcPgpArmorHeadersPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts b/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts deleted file mode 100644 index 1e93c1f94..000000000 --- a/portal-db/sdk/typescript/src/apis/RpcPgpKeyIdApi.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - RpcArmorPostRequest, -} from '../models/index'; -import { - RpcArmorPostRequestFromJSON, - RpcArmorPostRequestToJSON, -} from '../models/index'; - -export interface RpcPgpKeyIdGetRequest { - : string; -} - -export interface RpcPgpKeyIdPostRequest { - rpcArmorPostRequest: RpcArmorPostRequest; - prefer?: RpcPgpKeyIdPostPreferEnum; -} - -/** - * - */ -export class RpcPgpKeyIdApi extends runtime.BaseAPI { - - /** - */ - async rpcPgpKeyIdGetRaw(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters[''] == null) { - throw new runtime.RequiredError( - '', - 'Required parameter "" was null or undefined when calling rpcPgpKeyIdGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters[''] != null) { - queryParameters[''] = requestParameters['']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/rpc/pgp_key_id`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpKeyIdGet(requestParameters: RpcPgpKeyIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpKeyIdGetRaw(requestParameters, initOverrides); - } - - /** - */ - async rpcPgpKeyIdPostRaw(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['rpcArmorPostRequest'] == null) { - throw new runtime.RequiredError( - 'rpcArmorPostRequest', - 'Required parameter "rpcArmorPostRequest" was null or undefined when calling rpcPgpKeyIdPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/rpc/pgp_key_id`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RpcArmorPostRequestToJSON(requestParameters['rpcArmorPostRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async rpcPgpKeyIdPost(requestParameters: RpcPgpKeyIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rpcPgpKeyIdPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const RpcPgpKeyIdPostPreferEnum = { - ParamssingleObject: 'params=single-object' -} as const; -export type RpcPgpKeyIdPostPreferEnum = typeof RpcPgpKeyIdPostPreferEnum[keyof typeof RpcPgpKeyIdPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts b/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts deleted file mode 100644 index 9e4f193fc..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceEndpointsApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceEndpoints, -} from '../models/index'; -import { - ServiceEndpointsFromJSON, - ServiceEndpointsToJSON, -} from '../models/index'; - -export interface ServiceEndpointsDeleteRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsDeletePreferEnum; -} - -export interface ServiceEndpointsGetRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceEndpointsGetPreferEnum; -} - -export interface ServiceEndpointsPatchRequest { - endpointId?: number; - serviceId?: string; - endpointType?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceEndpointsPatchPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -export interface ServiceEndpointsPostRequest { - select?: string; - prefer?: ServiceEndpointsPostPreferEnum; - serviceEndpoints?: ServiceEndpoints; -} - -/** - * - */ -export class ServiceEndpointsApi extends runtime.BaseAPI { - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDeleteRaw(requestParameters: ServiceEndpointsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsDelete(requestParameters: ServiceEndpointsDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsDeleteRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGetRaw(requestParameters: ServiceEndpointsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceEndpointsFromJSON)); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsGet(requestParameters: ServiceEndpointsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceEndpointsGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatchRaw(requestParameters: ServiceEndpointsPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['endpointId'] != null) { - queryParameters['endpoint_id'] = requestParameters['endpointId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['endpointType'] != null) { - queryParameters['endpoint_type'] = requestParameters['endpointType']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPatch(requestParameters: ServiceEndpointsPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPatchRaw(requestParameters, initOverrides); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPostRaw(requestParameters: ServiceEndpointsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_endpoints`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceEndpointsToJSON(requestParameters['serviceEndpoints']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Available endpoint types for each service - */ - async serviceEndpointsPost(requestParameters: ServiceEndpointsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceEndpointsPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceEndpointsDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsDeletePreferEnum = typeof ServiceEndpointsDeletePreferEnum[keyof typeof ServiceEndpointsDeletePreferEnum]; -/** - * @export - */ -export const ServiceEndpointsGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceEndpointsGetPreferEnum = typeof ServiceEndpointsGetPreferEnum[keyof typeof ServiceEndpointsGetPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceEndpointsPatchPreferEnum = typeof ServiceEndpointsPatchPreferEnum[keyof typeof ServiceEndpointsPatchPreferEnum]; -/** - * @export - */ -export const ServiceEndpointsPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceEndpointsPostPreferEnum = typeof ServiceEndpointsPostPreferEnum[keyof typeof ServiceEndpointsPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts b/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts deleted file mode 100644 index 1a5f43ac7..000000000 --- a/portal-db/sdk/typescript/src/apis/ServiceFallbacksApi.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ServiceFallbacks, -} from '../models/index'; -import { - ServiceFallbacksFromJSON, - ServiceFallbacksToJSON, -} from '../models/index'; - -export interface ServiceFallbacksDeleteRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksDeletePreferEnum; -} - -export interface ServiceFallbacksGetRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServiceFallbacksGetPreferEnum; -} - -export interface ServiceFallbacksPatchRequest { - serviceFallbackId?: number; - serviceId?: string; - fallbackUrl?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServiceFallbacksPatchPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -export interface ServiceFallbacksPostRequest { - select?: string; - prefer?: ServiceFallbacksPostPreferEnum; - serviceFallbacks?: ServiceFallbacks; -} - -/** - * - */ -export class ServiceFallbacksApi extends runtime.BaseAPI { - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDeleteRaw(requestParameters: ServiceFallbacksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksDelete(requestParameters: ServiceFallbacksDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksDeleteRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGetRaw(requestParameters: ServiceFallbacksGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFallbacksFromJSON)); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksGet(requestParameters: ServiceFallbacksGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.serviceFallbacksGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatchRaw(requestParameters: ServiceFallbacksPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceFallbackId'] != null) { - queryParameters['service_fallback_id'] = requestParameters['serviceFallbackId']; - } - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['fallbackUrl'] != null) { - queryParameters['fallback_url'] = requestParameters['fallbackUrl']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPatch(requestParameters: ServiceFallbacksPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPatchRaw(requestParameters, initOverrides); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPostRaw(requestParameters: ServiceFallbacksPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/service_fallbacks`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceFallbacksToJSON(requestParameters['serviceFallbacks']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Fallback URLs for services when primary endpoints fail - */ - async serviceFallbacksPost(requestParameters: ServiceFallbacksPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceFallbacksPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServiceFallbacksDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksDeletePreferEnum = typeof ServiceFallbacksDeletePreferEnum[keyof typeof ServiceFallbacksDeletePreferEnum]; -/** - * @export - */ -export const ServiceFallbacksGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServiceFallbacksGetPreferEnum = typeof ServiceFallbacksGetPreferEnum[keyof typeof ServiceFallbacksGetPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServiceFallbacksPatchPreferEnum = typeof ServiceFallbacksPatchPreferEnum[keyof typeof ServiceFallbacksPatchPreferEnum]; -/** - * @export - */ -export const ServiceFallbacksPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServiceFallbacksPostPreferEnum = typeof ServiceFallbacksPostPreferEnum[keyof typeof ServiceFallbacksPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/ServicesApi.ts b/portal-db/sdk/typescript/src/apis/ServicesApi.ts deleted file mode 100644 index 36471e815..000000000 --- a/portal-db/sdk/typescript/src/apis/ServicesApi.ts +++ /dev/null @@ -1,532 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Services, -} from '../models/index'; -import { - ServicesFromJSON, - ServicesToJSON, -} from '../models/index'; - -export interface ServicesDeleteRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesDeletePreferEnum; -} - -export interface ServicesGetRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - select?: string; - order?: string; - range?: string; - rangeUnit?: string; - offset?: string; - limit?: string; - prefer?: ServicesGetPreferEnum; -} - -export interface ServicesPatchRequest { - serviceId?: string; - serviceName?: string; - computeUnitsPerRelay?: number; - serviceDomains?: string; - serviceOwnerAddress?: string; - networkId?: string; - active?: boolean; - beta?: boolean; - comingSoon?: boolean; - qualityFallbackEnabled?: boolean; - hardFallbackEnabled?: boolean; - svgIcon?: string; - publicEndpointUrl?: string; - statusEndpointUrl?: string; - statusQuery?: string; - deletedAt?: string; - createdAt?: string; - updatedAt?: string; - prefer?: ServicesPatchPreferEnum; - services?: Services; -} - -export interface ServicesPostRequest { - select?: string; - prefer?: ServicesPostPreferEnum; - services?: Services; -} - -/** - * - */ -export class ServicesApi extends runtime.BaseAPI { - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDeleteRaw(requestParameters: ServicesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesDelete(requestParameters: ServicesDeleteRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesDeleteRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGetRaw(requestParameters: ServicesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['range'] != null) { - headerParameters['Range'] = String(requestParameters['range']); - } - - if (requestParameters['rangeUnit'] != null) { - headerParameters['Range-Unit'] = String(requestParameters['rangeUnit']); - } - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServicesFromJSON)); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesGet(requestParameters: ServicesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise | null | undefined > { - const response = await this.servicesGetRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 206: - return null; - default: - return await response.value(); - } - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatchRaw(requestParameters: ServicesPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['serviceId'] != null) { - queryParameters['service_id'] = requestParameters['serviceId']; - } - - if (requestParameters['serviceName'] != null) { - queryParameters['service_name'] = requestParameters['serviceName']; - } - - if (requestParameters['computeUnitsPerRelay'] != null) { - queryParameters['compute_units_per_relay'] = requestParameters['computeUnitsPerRelay']; - } - - if (requestParameters['serviceDomains'] != null) { - queryParameters['service_domains'] = requestParameters['serviceDomains']; - } - - if (requestParameters['serviceOwnerAddress'] != null) { - queryParameters['service_owner_address'] = requestParameters['serviceOwnerAddress']; - } - - if (requestParameters['networkId'] != null) { - queryParameters['network_id'] = requestParameters['networkId']; - } - - if (requestParameters['active'] != null) { - queryParameters['active'] = requestParameters['active']; - } - - if (requestParameters['beta'] != null) { - queryParameters['beta'] = requestParameters['beta']; - } - - if (requestParameters['comingSoon'] != null) { - queryParameters['coming_soon'] = requestParameters['comingSoon']; - } - - if (requestParameters['qualityFallbackEnabled'] != null) { - queryParameters['quality_fallback_enabled'] = requestParameters['qualityFallbackEnabled']; - } - - if (requestParameters['hardFallbackEnabled'] != null) { - queryParameters['hard_fallback_enabled'] = requestParameters['hardFallbackEnabled']; - } - - if (requestParameters['svgIcon'] != null) { - queryParameters['svg_icon'] = requestParameters['svgIcon']; - } - - if (requestParameters['publicEndpointUrl'] != null) { - queryParameters['public_endpoint_url'] = requestParameters['publicEndpointUrl']; - } - - if (requestParameters['statusEndpointUrl'] != null) { - queryParameters['status_endpoint_url'] = requestParameters['statusEndpointUrl']; - } - - if (requestParameters['statusQuery'] != null) { - queryParameters['status_query'] = requestParameters['statusQuery']; - } - - if (requestParameters['deletedAt'] != null) { - queryParameters['deleted_at'] = requestParameters['deletedAt']; - } - - if (requestParameters['createdAt'] != null) { - queryParameters['created_at'] = requestParameters['createdAt']; - } - - if (requestParameters['updatedAt'] != null) { - queryParameters['updated_at'] = requestParameters['updatedAt']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPatch(requestParameters: ServicesPatchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPatchRaw(requestParameters, initOverrides); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPostRaw(requestParameters: ServicesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['select'] != null) { - queryParameters['select'] = requestParameters['select']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['prefer'] != null) { - headerParameters['Prefer'] = String(requestParameters['prefer']); - } - - - let urlPath = `/services`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServicesToJSON(requestParameters['services']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Supported blockchain services from the Pocket Network - */ - async servicesPost(requestParameters: ServicesPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.servicesPostRaw(requestParameters, initOverrides); - } - -} - -/** - * @export - */ -export const ServicesDeletePreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesDeletePreferEnum = typeof ServicesDeletePreferEnum[keyof typeof ServicesDeletePreferEnum]; -/** - * @export - */ -export const ServicesGetPreferEnum = { - Countnone: 'count=none' -} as const; -export type ServicesGetPreferEnum = typeof ServicesGetPreferEnum[keyof typeof ServicesGetPreferEnum]; -/** - * @export - */ -export const ServicesPatchPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none' -} as const; -export type ServicesPatchPreferEnum = typeof ServicesPatchPreferEnum[keyof typeof ServicesPatchPreferEnum]; -/** - * @export - */ -export const ServicesPostPreferEnum = { - Returnrepresentation: 'return=representation', - Returnminimal: 'return=minimal', - Returnnone: 'return=none', - ResolutionignoreDuplicates: 'resolution=ignore-duplicates', - ResolutionmergeDuplicates: 'resolution=merge-duplicates' -} as const; -export type ServicesPostPreferEnum = typeof ServicesPostPreferEnum[keyof typeof ServicesPostPreferEnum]; diff --git a/portal-db/sdk/typescript/src/apis/index.ts b/portal-db/sdk/typescript/src/apis/index.ts deleted file mode 100644 index 0a2a3000d..000000000 --- a/portal-db/sdk/typescript/src/apis/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './IntrospectionApi'; -export * from './NetworksApi'; -export * from './OrganizationsApi'; -export * from './PortalAccountRbacApi'; -export * from './PortalAccountsApi'; -export * from './PortalApplicationRbacApi'; -export * from './PortalApplicationsApi'; -export * from './PortalPlansApi'; -export * from './PortalUsersApi'; -export * from './PortalWorkersAccountDataApi'; -export * from './RpcArmorApi'; -export * from './RpcDearmorApi'; -export * from './RpcGenRandomUuidApi'; -export * from './RpcGenSaltApi'; -export * from './RpcPgpArmorHeadersApi'; -export * from './RpcPgpKeyIdApi'; -export * from './ServiceEndpointsApi'; -export * from './ServiceFallbacksApi'; -export * from './ServicesApi'; diff --git a/portal-db/sdk/typescript/src/index.ts b/portal-db/sdk/typescript/src/index.ts deleted file mode 100644 index bebe8bbbe..000000000 --- a/portal-db/sdk/typescript/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; diff --git a/portal-db/sdk/typescript/src/models/Networks.ts b/portal-db/sdk/typescript/src/models/Networks.ts deleted file mode 100644 index 8ff34b54a..000000000 --- a/portal-db/sdk/typescript/src/models/Networks.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain networks (Pocket mainnet, testnet, etc.) - * @export - * @interface Networks - */ -export interface Networks { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Networks - */ - networkId: string; -} - -/** - * Check if a given object implements the Networks interface. - */ -export function instanceOfNetworks(value: object): value is Networks { - if (!('networkId' in value) || value['networkId'] === undefined) return false; - return true; -} - -export function NetworksFromJSON(json: any): Networks { - return NetworksFromJSONTyped(json, false); -} - -export function NetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Networks { - if (json == null) { - return json; - } - return { - - 'networkId': json['network_id'], - }; -} - -export function NetworksToJSON(json: any): Networks { - return NetworksToJSONTyped(json, false); -} - -export function NetworksToJSONTyped(value?: Networks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'network_id': value['networkId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Organizations.ts b/portal-db/sdk/typescript/src/models/Organizations.ts deleted file mode 100644 index 3c35c6a79..000000000 --- a/portal-db/sdk/typescript/src/models/Organizations.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Companies or customer groups that can be attached to Portal Accounts - * @export - * @interface Organizations - */ -export interface Organizations { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof Organizations - */ - organizationId: number; - /** - * Name of the organization - * @type {string} - * @memberof Organizations - */ - organizationName: string; - /** - * Soft delete timestamp - * @type {string} - * @memberof Organizations - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Organizations - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Organizations interface. - */ -export function instanceOfOrganizations(value: object): value is Organizations { - if (!('organizationId' in value) || value['organizationId'] === undefined) return false; - if (!('organizationName' in value) || value['organizationName'] === undefined) return false; - return true; -} - -export function OrganizationsFromJSON(json: any): Organizations { - return OrganizationsFromJSONTyped(json, false); -} - -export function OrganizationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organizations { - if (json == null) { - return json; - } - return { - - 'organizationId': json['organization_id'], - 'organizationName': json['organization_name'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function OrganizationsToJSON(json: any): Organizations { - return OrganizationsToJSONTyped(json, false); -} - -export function OrganizationsToJSONTyped(value?: Organizations | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'organization_id': value['organizationId'], - 'organization_name': value['organizationName'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts b/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts deleted file mode 100644 index b605719a0..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccountRbac.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User roles and permissions for specific portal accounts - * @export - * @interface PortalAccountRbac - */ -export interface PortalAccountRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalAccountRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalAccountRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalAccountRbac - */ - roleName: string; - /** - * - * @type {boolean} - * @memberof PortalAccountRbac - */ - userJoinedAccount?: boolean; -} - -/** - * Check if a given object implements the PortalAccountRbac interface. - */ -export function instanceOfPortalAccountRbac(value: object): value is PortalAccountRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - if (!('roleName' in value) || value['roleName'] === undefined) return false; - return true; -} - -export function PortalAccountRbacFromJSON(json: any): PortalAccountRbac { - return PortalAccountRbacFromJSONTyped(json, false); -} - -export function PortalAccountRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccountRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalAccountId': json['portal_account_id'], - 'portalUserId': json['portal_user_id'], - 'roleName': json['role_name'], - 'userJoinedAccount': json['user_joined_account'] == null ? undefined : json['user_joined_account'], - }; -} - -export function PortalAccountRbacToJSON(json: any): PortalAccountRbac { - return PortalAccountRbacToJSONTyped(json, false); -} - -export function PortalAccountRbacToJSONTyped(value?: PortalAccountRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_account_id': value['portalAccountId'], - 'portal_user_id': value['portalUserId'], - 'role_name': value['roleName'], - 'user_joined_account': value['userJoinedAccount'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalAccounts.ts b/portal-db/sdk/typescript/src/models/PortalAccounts.ts deleted file mode 100644 index ee2b80517..000000000 --- a/portal-db/sdk/typescript/src/models/PortalAccounts.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Multi-tenant accounts with plans and billing integration - * @export - * @interface PortalAccounts - */ -export interface PortalAccounts { - /** - * Unique identifier for the portal account - * - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalAccounts - */ - portalAccountId: string; - /** - * Note: - * This is a Foreign Key to `organizations.organization_id`. - * @type {number} - * @memberof PortalAccounts - */ - organizationId?: number; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalAccounts - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - userAccountName?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - internalAccountName?: string; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - portalAccountUserLimitInterval?: PortalAccountsPortalAccountUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalAccounts - */ - portalAccountUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - billingType?: string; - /** - * Stripe subscription identifier for billing - * @type {string} - * @memberof PortalAccounts - */ - stripeSubscriptionId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpAccountId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalAccounts - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalAccountsPortalAccountUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalAccountsPortalAccountUserLimitIntervalEnum = typeof PortalAccountsPortalAccountUserLimitIntervalEnum[keyof typeof PortalAccountsPortalAccountUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalAccounts interface. - */ -export function instanceOfPortalAccounts(value: object): value is PortalAccounts { - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalAccountsFromJSON(json: any): PortalAccounts { - return PortalAccountsFromJSONTyped(json, false); -} - -export function PortalAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalAccounts { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'], - 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], - 'portalPlanType': json['portal_plan_type'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'internalAccountName': json['internal_account_name'] == null ? undefined : json['internal_account_name'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'portalAccountUserLimitInterval': json['portal_account_user_limit_interval'] == null ? undefined : json['portal_account_user_limit_interval'], - 'portalAccountUserLimitRps': json['portal_account_user_limit_rps'] == null ? undefined : json['portal_account_user_limit_rps'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'stripeSubscriptionId': json['stripe_subscription_id'] == null ? undefined : json['stripe_subscription_id'], - 'gcpAccountId': json['gcp_account_id'] == null ? undefined : json['gcp_account_id'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalAccountsToJSON(json: any): PortalAccounts { - return PortalAccountsToJSONTyped(json, false); -} - -export function PortalAccountsToJSONTyped(value?: PortalAccounts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'organization_id': value['organizationId'], - 'portal_plan_type': value['portalPlanType'], - 'user_account_name': value['userAccountName'], - 'internal_account_name': value['internalAccountName'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'portal_account_user_limit_interval': value['portalAccountUserLimitInterval'], - 'portal_account_user_limit_rps': value['portalAccountUserLimitRps'], - 'billing_type': value['billingType'], - 'stripe_subscription_id': value['stripeSubscriptionId'], - 'gcp_account_id': value['gcpAccountId'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts b/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts deleted file mode 100644 index 5216b4f8a..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplicationRbac.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * User access controls for specific applications - * @export - * @interface PortalApplicationRbac - */ -export interface PortalApplicationRbac { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof PortalApplicationRbac - */ - id: number; - /** - * Note: - * This is a Foreign Key to `portal_applications.portal_application_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_users.portal_user_id`. - * @type {string} - * @memberof PortalApplicationRbac - */ - portalUserId: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplicationRbac - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the PortalApplicationRbac interface. - */ -export function instanceOfPortalApplicationRbac(value: object): value is PortalApplicationRbac { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - return true; -} - -export function PortalApplicationRbacFromJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacFromJSONTyped(json, false); -} - -export function PortalApplicationRbacFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplicationRbac { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'portalApplicationId': json['portal_application_id'], - 'portalUserId': json['portal_user_id'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationRbacToJSON(json: any): PortalApplicationRbac { - return PortalApplicationRbacToJSONTyped(json, false); -} - -export function PortalApplicationRbacToJSONTyped(value?: PortalApplicationRbac | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'portal_application_id': value['portalApplicationId'], - 'portal_user_id': value['portalUserId'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalApplications.ts b/portal-db/sdk/typescript/src/models/PortalApplications.ts deleted file mode 100644 index 08c5953bc..000000000 --- a/portal-db/sdk/typescript/src/models/PortalApplications.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Applications created within portal accounts with their own rate limits and settings - * @export - * @interface PortalApplications - */ -export interface PortalApplications { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalApplications - */ - portalApplicationId: string; - /** - * Note: - * This is a Foreign Key to `portal_accounts.portal_account_id`. - * @type {string} - * @memberof PortalApplications - */ - portalAccountId: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationName?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - emoji?: string; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationUserLimitInterval?: PortalApplicationsPortalApplicationUserLimitIntervalEnum; - /** - * - * @type {number} - * @memberof PortalApplications - */ - portalApplicationUserLimitRps?: number; - /** - * - * @type {string} - * @memberof PortalApplications - */ - portalApplicationDescription?: string; - /** - * - * @type {Array} - * @memberof PortalApplications - */ - favoriteServiceIds?: Array; - /** - * Hashed secret key for application authentication - * @type {string} - * @memberof PortalApplications - */ - secretKeyHash?: string; - /** - * - * @type {boolean} - * @memberof PortalApplications - */ - secretKeyRequired?: boolean; - /** - * - * @type {string} - * @memberof PortalApplications - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalApplications - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const PortalApplicationsPortalApplicationUserLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalApplicationsPortalApplicationUserLimitIntervalEnum = typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum[keyof typeof PortalApplicationsPortalApplicationUserLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalApplications interface. - */ -export function instanceOfPortalApplications(value: object): value is PortalApplications { - if (!('portalApplicationId' in value) || value['portalApplicationId'] === undefined) return false; - if (!('portalAccountId' in value) || value['portalAccountId'] === undefined) return false; - return true; -} - -export function PortalApplicationsFromJSON(json: any): PortalApplications { - return PortalApplicationsFromJSONTyped(json, false); -} - -export function PortalApplicationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalApplications { - if (json == null) { - return json; - } - return { - - 'portalApplicationId': json['portal_application_id'], - 'portalAccountId': json['portal_account_id'], - 'portalApplicationName': json['portal_application_name'] == null ? undefined : json['portal_application_name'], - 'emoji': json['emoji'] == null ? undefined : json['emoji'], - 'portalApplicationUserLimit': json['portal_application_user_limit'] == null ? undefined : json['portal_application_user_limit'], - 'portalApplicationUserLimitInterval': json['portal_application_user_limit_interval'] == null ? undefined : json['portal_application_user_limit_interval'], - 'portalApplicationUserLimitRps': json['portal_application_user_limit_rps'] == null ? undefined : json['portal_application_user_limit_rps'], - 'portalApplicationDescription': json['portal_application_description'] == null ? undefined : json['portal_application_description'], - 'favoriteServiceIds': json['favorite_service_ids'] == null ? undefined : json['favorite_service_ids'], - 'secretKeyHash': json['secret_key_hash'] == null ? undefined : json['secret_key_hash'], - 'secretKeyRequired': json['secret_key_required'] == null ? undefined : json['secret_key_required'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalApplicationsToJSON(json: any): PortalApplications { - return PortalApplicationsToJSONTyped(json, false); -} - -export function PortalApplicationsToJSONTyped(value?: PortalApplications | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_application_id': value['portalApplicationId'], - 'portal_account_id': value['portalAccountId'], - 'portal_application_name': value['portalApplicationName'], - 'emoji': value['emoji'], - 'portal_application_user_limit': value['portalApplicationUserLimit'], - 'portal_application_user_limit_interval': value['portalApplicationUserLimitInterval'], - 'portal_application_user_limit_rps': value['portalApplicationUserLimitRps'], - 'portal_application_description': value['portalApplicationDescription'], - 'favorite_service_ids': value['favoriteServiceIds'], - 'secret_key_hash': value['secretKeyHash'], - 'secret_key_required': value['secretKeyRequired'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalPlans.ts b/portal-db/sdk/typescript/src/models/PortalPlans.ts deleted file mode 100644 index d89b2b209..000000000 --- a/portal-db/sdk/typescript/src/models/PortalPlans.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available subscription plans for Portal Accounts - * @export - * @interface PortalPlans - */ -export interface PortalPlans { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalPlans - */ - portalPlanType: string; - /** - * - * @type {string} - * @memberof PortalPlans - */ - portalPlanTypeDescription?: string; - /** - * Maximum usage allowed within the interval - * @type {number} - * @memberof PortalPlans - */ - planUsageLimit?: number; - /** - * - * @type {string} - * @memberof PortalPlans - */ - planUsageLimitInterval?: PortalPlansPlanUsageLimitIntervalEnum; - /** - * Rate limit in requests per second - * @type {number} - * @memberof PortalPlans - */ - planRateLimitRps?: number; - /** - * - * @type {number} - * @memberof PortalPlans - */ - planApplicationLimit?: number; -} - - -/** - * @export - */ -export const PortalPlansPlanUsageLimitIntervalEnum = { - Day: 'day', - Month: 'month', - Year: 'year' -} as const; -export type PortalPlansPlanUsageLimitIntervalEnum = typeof PortalPlansPlanUsageLimitIntervalEnum[keyof typeof PortalPlansPlanUsageLimitIntervalEnum]; - - -/** - * Check if a given object implements the PortalPlans interface. - */ -export function instanceOfPortalPlans(value: object): value is PortalPlans { - if (!('portalPlanType' in value) || value['portalPlanType'] === undefined) return false; - return true; -} - -export function PortalPlansFromJSON(json: any): PortalPlans { - return PortalPlansFromJSONTyped(json, false); -} - -export function PortalPlansFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalPlans { - if (json == null) { - return json; - } - return { - - 'portalPlanType': json['portal_plan_type'], - 'portalPlanTypeDescription': json['portal_plan_type_description'] == null ? undefined : json['portal_plan_type_description'], - 'planUsageLimit': json['plan_usage_limit'] == null ? undefined : json['plan_usage_limit'], - 'planUsageLimitInterval': json['plan_usage_limit_interval'] == null ? undefined : json['plan_usage_limit_interval'], - 'planRateLimitRps': json['plan_rate_limit_rps'] == null ? undefined : json['plan_rate_limit_rps'], - 'planApplicationLimit': json['plan_application_limit'] == null ? undefined : json['plan_application_limit'], - }; -} - -export function PortalPlansToJSON(json: any): PortalPlans { - return PortalPlansToJSONTyped(json, false); -} - -export function PortalPlansToJSONTyped(value?: PortalPlans | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_plan_type': value['portalPlanType'], - 'portal_plan_type_description': value['portalPlanTypeDescription'], - 'plan_usage_limit': value['planUsageLimit'], - 'plan_usage_limit_interval': value['planUsageLimitInterval'], - 'plan_rate_limit_rps': value['planRateLimitRps'], - 'plan_application_limit': value['planApplicationLimit'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalUsers.ts b/portal-db/sdk/typescript/src/models/PortalUsers.ts deleted file mode 100644 index fe8765d1a..000000000 --- a/portal-db/sdk/typescript/src/models/PortalUsers.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Users who can access the portal and belong to multiple accounts - * @export - * @interface PortalUsers - */ -export interface PortalUsers { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalUsers - */ - portalUserId: string; - /** - * Unique email address for the user - * @type {string} - * @memberof PortalUsers - */ - portalUserEmail: string; - /** - * - * @type {boolean} - * @memberof PortalUsers - */ - signedUp?: boolean; - /** - * Whether user has admin privileges across the portal - * @type {boolean} - * @memberof PortalUsers - */ - portalAdmin?: boolean; - /** - * - * @type {string} - * @memberof PortalUsers - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof PortalUsers - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof PortalUsers - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the PortalUsers interface. - */ -export function instanceOfPortalUsers(value: object): value is PortalUsers { - if (!('portalUserId' in value) || value['portalUserId'] === undefined) return false; - if (!('portalUserEmail' in value) || value['portalUserEmail'] === undefined) return false; - return true; -} - -export function PortalUsersFromJSON(json: any): PortalUsers { - return PortalUsersFromJSONTyped(json, false); -} - -export function PortalUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalUsers { - if (json == null) { - return json; - } - return { - - 'portalUserId': json['portal_user_id'], - 'portalUserEmail': json['portal_user_email'], - 'signedUp': json['signed_up'] == null ? undefined : json['signed_up'], - 'portalAdmin': json['portal_admin'] == null ? undefined : json['portal_admin'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function PortalUsersToJSON(json: any): PortalUsers { - return PortalUsersToJSONTyped(json, false); -} - -export function PortalUsersToJSONTyped(value?: PortalUsers | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_user_id': value['portalUserId'], - 'portal_user_email': value['portalUserEmail'], - 'signed_up': value['signedUp'], - 'portal_admin': value['portalAdmin'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts b/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts deleted file mode 100644 index 44834dcec..000000000 --- a/portal-db/sdk/typescript/src/models/PortalWorkersAccountData.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' - * @export - * @interface PortalWorkersAccountData - */ -export interface PortalWorkersAccountData { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalWorkersAccountData - */ - portalAccountId?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - userAccountName?: string; - /** - * Note: - * This is a Foreign Key to `portal_plans.portal_plan_type`. - * @type {string} - * @memberof PortalWorkersAccountData - */ - portalPlanType?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - billingType?: string; - /** - * - * @type {number} - * @memberof PortalWorkersAccountData - */ - portalAccountUserLimit?: number; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - gcpEntitlementId?: string; - /** - * - * @type {string} - * @memberof PortalWorkersAccountData - */ - ownerEmail?: string; - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof PortalWorkersAccountData - */ - ownerUserId?: string; -} - -/** - * Check if a given object implements the PortalWorkersAccountData interface. - */ -export function instanceOfPortalWorkersAccountData(value: object): value is PortalWorkersAccountData { - return true; -} - -export function PortalWorkersAccountDataFromJSON(json: any): PortalWorkersAccountData { - return PortalWorkersAccountDataFromJSONTyped(json, false); -} - -export function PortalWorkersAccountDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortalWorkersAccountData { - if (json == null) { - return json; - } - return { - - 'portalAccountId': json['portal_account_id'] == null ? undefined : json['portal_account_id'], - 'userAccountName': json['user_account_name'] == null ? undefined : json['user_account_name'], - 'portalPlanType': json['portal_plan_type'] == null ? undefined : json['portal_plan_type'], - 'billingType': json['billing_type'] == null ? undefined : json['billing_type'], - 'portalAccountUserLimit': json['portal_account_user_limit'] == null ? undefined : json['portal_account_user_limit'], - 'gcpEntitlementId': json['gcp_entitlement_id'] == null ? undefined : json['gcp_entitlement_id'], - 'ownerEmail': json['owner_email'] == null ? undefined : json['owner_email'], - 'ownerUserId': json['owner_user_id'] == null ? undefined : json['owner_user_id'], - }; -} - -export function PortalWorkersAccountDataToJSON(json: any): PortalWorkersAccountData { - return PortalWorkersAccountDataToJSONTyped(json, false); -} - -export function PortalWorkersAccountDataToJSONTyped(value?: PortalWorkersAccountData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'portal_account_id': value['portalAccountId'], - 'user_account_name': value['userAccountName'], - 'portal_plan_type': value['portalPlanType'], - 'billing_type': value['billingType'], - 'portal_account_user_limit': value['portalAccountUserLimit'], - 'gcp_entitlement_id': value['gcpEntitlementId'], - 'owner_email': value['ownerEmail'], - 'owner_user_id': value['ownerUserId'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts deleted file mode 100644 index 8ad6bc8bf..000000000 --- a/portal-db/sdk/typescript/src/models/RpcArmorPostRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RpcArmorPostRequest - */ -export interface RpcArmorPostRequest { - /** - * - * @type {string} - * @memberof RpcArmorPostRequest - */ - : string; -} - -/** - * Check if a given object implements the RpcArmorPostRequest interface. - */ -export function instanceOfRpcArmorPostRequest(value: object): value is RpcArmorPostRequest { - if (!('' in value) || value[''] === undefined) return false; - return true; -} - -export function RpcArmorPostRequestFromJSON(json: any): RpcArmorPostRequest { - return RpcArmorPostRequestFromJSONTyped(json, false); -} - -export function RpcArmorPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcArmorPostRequest { - if (json == null) { - return json; - } - return { - - '': json[''], - }; -} - -export function RpcArmorPostRequestToJSON(json: any): RpcArmorPostRequest { - return RpcArmorPostRequestToJSONTyped(json, false); -} - -export function RpcArmorPostRequestToJSONTyped(value?: RpcArmorPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - '': value[''], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts b/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts deleted file mode 100644 index d09a9f460..000000000 --- a/portal-db/sdk/typescript/src/models/RpcGenSaltPostRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RpcGenSaltPostRequest - */ -export interface RpcGenSaltPostRequest { - /** - * - * @type {string} - * @memberof RpcGenSaltPostRequest - */ - : string; -} - -/** - * Check if a given object implements the RpcGenSaltPostRequest interface. - */ -export function instanceOfRpcGenSaltPostRequest(value: object): value is RpcGenSaltPostRequest { - if (!('' in value) || value[''] === undefined) return false; - return true; -} - -export function RpcGenSaltPostRequestFromJSON(json: any): RpcGenSaltPostRequest { - return RpcGenSaltPostRequestFromJSONTyped(json, false); -} - -export function RpcGenSaltPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RpcGenSaltPostRequest { - if (json == null) { - return json; - } - return { - - '': json[''], - }; -} - -export function RpcGenSaltPostRequestToJSON(json: any): RpcGenSaltPostRequest { - return RpcGenSaltPostRequestToJSONTyped(json, false); -} - -export function RpcGenSaltPostRequestToJSONTyped(value?: RpcGenSaltPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - '': value[''], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts b/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts deleted file mode 100644 index 516acad4a..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceEndpoints.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Available endpoint types for each service - * @export - * @interface ServiceEndpoints - */ -export interface ServiceEndpoints { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceEndpoints - */ - endpointId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceEndpoints - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - endpointType?: ServiceEndpointsEndpointTypeEnum; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceEndpoints - */ - updatedAt?: string; -} - - -/** - * @export - */ -export const ServiceEndpointsEndpointTypeEnum = { - CometBft: 'cometBFT', - Cosmos: 'cosmos', - Rest: 'REST', - JsonRpc: 'JSON-RPC', - Wss: 'WSS', - GRpc: 'gRPC' -} as const; -export type ServiceEndpointsEndpointTypeEnum = typeof ServiceEndpointsEndpointTypeEnum[keyof typeof ServiceEndpointsEndpointTypeEnum]; - - -/** - * Check if a given object implements the ServiceEndpoints interface. - */ -export function instanceOfServiceEndpoints(value: object): value is ServiceEndpoints { - if (!('endpointId' in value) || value['endpointId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - return true; -} - -export function ServiceEndpointsFromJSON(json: any): ServiceEndpoints { - return ServiceEndpointsFromJSONTyped(json, false); -} - -export function ServiceEndpointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoints { - if (json == null) { - return json; - } - return { - - 'endpointId': json['endpoint_id'], - 'serviceId': json['service_id'], - 'endpointType': json['endpoint_type'] == null ? undefined : json['endpoint_type'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceEndpointsToJSON(json: any): ServiceEndpoints { - return ServiceEndpointsToJSONTyped(json, false); -} - -export function ServiceEndpointsToJSONTyped(value?: ServiceEndpoints | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'endpoint_id': value['endpointId'], - 'service_id': value['serviceId'], - 'endpoint_type': value['endpointType'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts b/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts deleted file mode 100644 index a10559ad2..000000000 --- a/portal-db/sdk/typescript/src/models/ServiceFallbacks.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Fallback URLs for services when primary endpoints fail - * @export - * @interface ServiceFallbacks - */ -export interface ServiceFallbacks { - /** - * Note: - * This is a Primary Key. - * @type {number} - * @memberof ServiceFallbacks - */ - serviceFallbackId: number; - /** - * Note: - * This is a Foreign Key to `services.service_id`. - * @type {string} - * @memberof ServiceFallbacks - */ - serviceId: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - fallbackUrl: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof ServiceFallbacks - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the ServiceFallbacks interface. - */ -export function instanceOfServiceFallbacks(value: object): value is ServiceFallbacks { - if (!('serviceFallbackId' in value) || value['serviceFallbackId'] === undefined) return false; - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('fallbackUrl' in value) || value['fallbackUrl'] === undefined) return false; - return true; -} - -export function ServiceFallbacksFromJSON(json: any): ServiceFallbacks { - return ServiceFallbacksFromJSONTyped(json, false); -} - -export function ServiceFallbacksFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceFallbacks { - if (json == null) { - return json; - } - return { - - 'serviceFallbackId': json['service_fallback_id'], - 'serviceId': json['service_id'], - 'fallbackUrl': json['fallback_url'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServiceFallbacksToJSON(json: any): ServiceFallbacks { - return ServiceFallbacksToJSONTyped(json, false); -} - -export function ServiceFallbacksToJSONTyped(value?: ServiceFallbacks | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_fallback_id': value['serviceFallbackId'], - 'service_id': value['serviceId'], - 'fallback_url': value['fallbackUrl'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/Services.ts b/portal-db/sdk/typescript/src/models/Services.ts deleted file mode 100644 index 766a36099..000000000 --- a/portal-db/sdk/typescript/src/models/Services.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Supported blockchain services from the Pocket Network - * @export - * @interface Services - */ -export interface Services { - /** - * Note: - * This is a Primary Key. - * @type {string} - * @memberof Services - */ - serviceId: string; - /** - * - * @type {string} - * @memberof Services - */ - serviceName: string; - /** - * Cost in compute units for each relay - * @type {number} - * @memberof Services - */ - computeUnitsPerRelay?: number; - /** - * Valid domains for this service - * @type {Array} - * @memberof Services - */ - serviceDomains: Array; - /** - * - * @type {string} - * @memberof Services - */ - serviceOwnerAddress?: string; - /** - * Note: - * This is a Foreign Key to `networks.network_id`. - * @type {string} - * @memberof Services - */ - networkId?: string; - /** - * - * @type {boolean} - * @memberof Services - */ - active?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - beta?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - comingSoon?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - qualityFallbackEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof Services - */ - hardFallbackEnabled?: boolean; - /** - * - * @type {string} - * @memberof Services - */ - svgIcon?: string; - /** - * - * @type {string} - * @memberof Services - */ - publicEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusEndpointUrl?: string; - /** - * - * @type {string} - * @memberof Services - */ - statusQuery?: string; - /** - * - * @type {string} - * @memberof Services - */ - deletedAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof Services - */ - updatedAt?: string; -} - -/** - * Check if a given object implements the Services interface. - */ -export function instanceOfServices(value: object): value is Services { - if (!('serviceId' in value) || value['serviceId'] === undefined) return false; - if (!('serviceName' in value) || value['serviceName'] === undefined) return false; - if (!('serviceDomains' in value) || value['serviceDomains'] === undefined) return false; - return true; -} - -export function ServicesFromJSON(json: any): Services { - return ServicesFromJSONTyped(json, false); -} - -export function ServicesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Services { - if (json == null) { - return json; - } - return { - - 'serviceId': json['service_id'], - 'serviceName': json['service_name'], - 'computeUnitsPerRelay': json['compute_units_per_relay'] == null ? undefined : json['compute_units_per_relay'], - 'serviceDomains': json['service_domains'], - 'serviceOwnerAddress': json['service_owner_address'] == null ? undefined : json['service_owner_address'], - 'networkId': json['network_id'] == null ? undefined : json['network_id'], - 'active': json['active'] == null ? undefined : json['active'], - 'beta': json['beta'] == null ? undefined : json['beta'], - 'comingSoon': json['coming_soon'] == null ? undefined : json['coming_soon'], - 'qualityFallbackEnabled': json['quality_fallback_enabled'] == null ? undefined : json['quality_fallback_enabled'], - 'hardFallbackEnabled': json['hard_fallback_enabled'] == null ? undefined : json['hard_fallback_enabled'], - 'svgIcon': json['svg_icon'] == null ? undefined : json['svg_icon'], - 'publicEndpointUrl': json['public_endpoint_url'] == null ? undefined : json['public_endpoint_url'], - 'statusEndpointUrl': json['status_endpoint_url'] == null ? undefined : json['status_endpoint_url'], - 'statusQuery': json['status_query'] == null ? undefined : json['status_query'], - 'deletedAt': json['deleted_at'] == null ? undefined : json['deleted_at'], - 'createdAt': json['created_at'] == null ? undefined : json['created_at'], - 'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'], - }; -} - -export function ServicesToJSON(json: any): Services { - return ServicesToJSONTyped(json, false); -} - -export function ServicesToJSONTyped(value?: Services | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'service_id': value['serviceId'], - 'service_name': value['serviceName'], - 'compute_units_per_relay': value['computeUnitsPerRelay'], - 'service_domains': value['serviceDomains'], - 'service_owner_address': value['serviceOwnerAddress'], - 'network_id': value['networkId'], - 'active': value['active'], - 'beta': value['beta'], - 'coming_soon': value['comingSoon'], - 'quality_fallback_enabled': value['qualityFallbackEnabled'], - 'hard_fallback_enabled': value['hardFallbackEnabled'], - 'svg_icon': value['svgIcon'], - 'public_endpoint_url': value['publicEndpointUrl'], - 'status_endpoint_url': value['statusEndpointUrl'], - 'status_query': value['statusQuery'], - 'deleted_at': value['deletedAt'], - 'created_at': value['createdAt'], - 'updated_at': value['updatedAt'], - }; -} - diff --git a/portal-db/sdk/typescript/src/models/index.ts b/portal-db/sdk/typescript/src/models/index.ts deleted file mode 100644 index 73f2ab8b2..000000000 --- a/portal-db/sdk/typescript/src/models/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Networks'; -export * from './Organizations'; -export * from './PortalAccountRbac'; -export * from './PortalAccounts'; -export * from './PortalApplicationRbac'; -export * from './PortalApplications'; -export * from './PortalPlans'; -export * from './PortalUsers'; -export * from './PortalWorkersAccountData'; -export * from './RpcArmorPostRequest'; -export * from './RpcGenSaltPostRequest'; -export * from './ServiceEndpoints'; -export * from './ServiceFallbacks'; -export * from './Services'; diff --git a/portal-db/sdk/typescript/src/runtime.ts b/portal-db/sdk/typescript/src/runtime.ts deleted file mode 100644 index f4d9fba5c..000000000 --- a/portal-db/sdk/typescript/src/runtime.ts +++ /dev/null @@ -1,432 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * standard public schema - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 12.0.2 (a4e00ff) - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - -export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/portal-db/sdk/typescript/tsconfig.json b/portal-db/sdk/typescript/tsconfig.json index 4567ec198..16683e950 100644 --- a/portal-db/sdk/typescript/tsconfig.json +++ b/portal-db/sdk/typescript/tsconfig.json @@ -1,20 +1,18 @@ { "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": ["ES2020", "DOM"], + "moduleResolution": "Bundler", + "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] + "declarationMap": true }, - "exclude": [ - "dist", - "node_modules" - ] + "include": ["*.ts"], + "exclude": ["node_modules", "dist"] } diff --git a/portal-db/sdk/typescript/types.ts b/portal-db/sdk/typescript/types.ts new file mode 100644 index 000000000..e34045bd1 --- /dev/null +++ b/portal-db/sdk/typescript/types.ts @@ -0,0 +1,2861 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** OpenAPI description (this document) */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/service_fallbacks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Fallback URLs for services when primary endpoints fail */ + get: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["service_fallbacks"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"][]; + "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"][]; + "text/csv": components["schemas"]["service_fallbacks"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Fallback URLs for services when primary endpoints fail */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_fallbacks"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Fallback URLs for services when primary endpoints fail */ + delete: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Fallback URLs for services when primary endpoints fail */ + patch: { + parameters: { + query?: { + service_fallback_id?: components["parameters"]["rowFilter.service_fallbacks.service_fallback_id"]; + service_id?: components["parameters"]["rowFilter.service_fallbacks.service_id"]; + fallback_url?: components["parameters"]["rowFilter.service_fallbacks.fallback_url"]; + created_at?: components["parameters"]["rowFilter.service_fallbacks.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_fallbacks.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_fallbacks"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_application_rbac": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** User access controls for specific applications */ + get: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_application_rbac.id"]; + portal_application_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_application_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_user_id"]; + created_at?: components["parameters"]["rowFilter.portal_application_rbac.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_application_rbac.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_application_rbac"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_application_rbac"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_application_rbac"][]; + "text/csv": components["schemas"]["portal_application_rbac"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** User access controls for specific applications */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_application_rbac"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** User access controls for specific applications */ + delete: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_application_rbac.id"]; + portal_application_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_application_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_user_id"]; + created_at?: components["parameters"]["rowFilter.portal_application_rbac.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_application_rbac.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** User access controls for specific applications */ + patch: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_application_rbac.id"]; + portal_application_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_application_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_application_rbac.portal_user_id"]; + created_at?: components["parameters"]["rowFilter.portal_application_rbac.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_application_rbac.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_application_rbac"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_plans": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Available subscription plans for Portal Accounts */ + get: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_plans"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"][]; + "text/csv": components["schemas"]["portal_plans"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Available subscription plans for Portal Accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_plans"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Available subscription plans for Portal Accounts */ + delete: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Available subscription plans for Portal Accounts */ + patch: { + parameters: { + query?: { + portal_plan_type?: components["parameters"]["rowFilter.portal_plans.portal_plan_type"]; + portal_plan_type_description?: components["parameters"]["rowFilter.portal_plans.portal_plan_type_description"]; + /** @description Maximum usage allowed within the interval */ + plan_usage_limit?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit"]; + plan_usage_limit_interval?: components["parameters"]["rowFilter.portal_plans.plan_usage_limit_interval"]; + /** @description Rate limit in requests per second */ + plan_rate_limit_rps?: components["parameters"]["rowFilter.portal_plans.plan_rate_limit_rps"]; + plan_application_limit?: components["parameters"]["rowFilter.portal_plans.plan_application_limit"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_plans"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_users": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Users who can access the portal and belong to multiple accounts */ + get: { + parameters: { + query?: { + portal_user_id?: components["parameters"]["rowFilter.portal_users.portal_user_id"]; + /** @description Unique email address for the user */ + portal_user_email?: components["parameters"]["rowFilter.portal_users.portal_user_email"]; + signed_up?: components["parameters"]["rowFilter.portal_users.signed_up"]; + /** @description Whether user has admin privileges across the portal */ + portal_admin?: components["parameters"]["rowFilter.portal_users.portal_admin"]; + deleted_at?: components["parameters"]["rowFilter.portal_users.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_users.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_users.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_users"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_users"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_users"][]; + "text/csv": components["schemas"]["portal_users"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Users who can access the portal and belong to multiple accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_users"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Users who can access the portal and belong to multiple accounts */ + delete: { + parameters: { + query?: { + portal_user_id?: components["parameters"]["rowFilter.portal_users.portal_user_id"]; + /** @description Unique email address for the user */ + portal_user_email?: components["parameters"]["rowFilter.portal_users.portal_user_email"]; + signed_up?: components["parameters"]["rowFilter.portal_users.signed_up"]; + /** @description Whether user has admin privileges across the portal */ + portal_admin?: components["parameters"]["rowFilter.portal_users.portal_admin"]; + deleted_at?: components["parameters"]["rowFilter.portal_users.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_users.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_users.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Users who can access the portal and belong to multiple accounts */ + patch: { + parameters: { + query?: { + portal_user_id?: components["parameters"]["rowFilter.portal_users.portal_user_id"]; + /** @description Unique email address for the user */ + portal_user_email?: components["parameters"]["rowFilter.portal_users.portal_user_email"]; + signed_up?: components["parameters"]["rowFilter.portal_users.signed_up"]; + /** @description Whether user has admin privileges across the portal */ + portal_admin?: components["parameters"]["rowFilter.portal_users.portal_admin"]; + deleted_at?: components["parameters"]["rowFilter.portal_users.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_users.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_users.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_users"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_applications": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Applications created within portal accounts with their own rate limits and settings */ + get: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_applications"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"][]; + "text/csv": components["schemas"]["portal_applications"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Applications created within portal accounts with their own rate limits and settings */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_applications"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Applications created within portal accounts with their own rate limits and settings */ + delete: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Applications created within portal accounts with their own rate limits and settings */ + patch: { + parameters: { + query?: { + portal_application_id?: components["parameters"]["rowFilter.portal_applications.portal_application_id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_applications.portal_account_id"]; + portal_application_name?: components["parameters"]["rowFilter.portal_applications.portal_application_name"]; + emoji?: components["parameters"]["rowFilter.portal_applications.emoji"]; + portal_application_user_limit?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit"]; + portal_application_user_limit_interval?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_interval"]; + portal_application_user_limit_rps?: components["parameters"]["rowFilter.portal_applications.portal_application_user_limit_rps"]; + portal_application_description?: components["parameters"]["rowFilter.portal_applications.portal_application_description"]; + favorite_service_ids?: components["parameters"]["rowFilter.portal_applications.favorite_service_ids"]; + /** @description Hashed secret key for application authentication */ + secret_key_hash?: components["parameters"]["rowFilter.portal_applications.secret_key_hash"]; + secret_key_required?: components["parameters"]["rowFilter.portal_applications.secret_key_required"]; + deleted_at?: components["parameters"]["rowFilter.portal_applications.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_applications.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_applications.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_applications"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/services": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Supported blockchain services from the Pocket Network */ + get: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + public_endpoint_url?: components["parameters"]["rowFilter.services.public_endpoint_url"]; + status_endpoint_url?: components["parameters"]["rowFilter.services.status_endpoint_url"]; + status_query?: components["parameters"]["rowFilter.services.status_query"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["services"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"][]; + "application/vnd.pgrst.object+json": components["schemas"]["services"][]; + "text/csv": components["schemas"]["services"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Supported blockchain services from the Pocket Network */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["services"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Supported blockchain services from the Pocket Network */ + delete: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + public_endpoint_url?: components["parameters"]["rowFilter.services.public_endpoint_url"]; + status_endpoint_url?: components["parameters"]["rowFilter.services.status_endpoint_url"]; + status_query?: components["parameters"]["rowFilter.services.status_query"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Supported blockchain services from the Pocket Network */ + patch: { + parameters: { + query?: { + service_id?: components["parameters"]["rowFilter.services.service_id"]; + service_name?: components["parameters"]["rowFilter.services.service_name"]; + /** @description Cost in compute units for each relay */ + compute_units_per_relay?: components["parameters"]["rowFilter.services.compute_units_per_relay"]; + /** @description Valid domains for this service */ + service_domains?: components["parameters"]["rowFilter.services.service_domains"]; + service_owner_address?: components["parameters"]["rowFilter.services.service_owner_address"]; + network_id?: components["parameters"]["rowFilter.services.network_id"]; + active?: components["parameters"]["rowFilter.services.active"]; + beta?: components["parameters"]["rowFilter.services.beta"]; + coming_soon?: components["parameters"]["rowFilter.services.coming_soon"]; + quality_fallback_enabled?: components["parameters"]["rowFilter.services.quality_fallback_enabled"]; + hard_fallback_enabled?: components["parameters"]["rowFilter.services.hard_fallback_enabled"]; + svg_icon?: components["parameters"]["rowFilter.services.svg_icon"]; + public_endpoint_url?: components["parameters"]["rowFilter.services.public_endpoint_url"]; + status_endpoint_url?: components["parameters"]["rowFilter.services.status_endpoint_url"]; + status_query?: components["parameters"]["rowFilter.services.status_query"]; + deleted_at?: components["parameters"]["rowFilter.services.deleted_at"]; + created_at?: components["parameters"]["rowFilter.services.created_at"]; + updated_at?: components["parameters"]["rowFilter.services.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["services"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_accounts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Multi-tenant accounts with plans and billing integration */ + get: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_accounts"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"][]; + "text/csv": components["schemas"]["portal_accounts"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Multi-tenant accounts with plans and billing integration */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_accounts"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Multi-tenant accounts with plans and billing integration */ + delete: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Multi-tenant accounts with plans and billing integration */ + patch: { + parameters: { + query?: { + /** @description Unique identifier for the portal account */ + portal_account_id?: components["parameters"]["rowFilter.portal_accounts.portal_account_id"]; + organization_id?: components["parameters"]["rowFilter.portal_accounts.organization_id"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_accounts.portal_plan_type"]; + user_account_name?: components["parameters"]["rowFilter.portal_accounts.user_account_name"]; + internal_account_name?: components["parameters"]["rowFilter.portal_accounts.internal_account_name"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit"]; + portal_account_user_limit_interval?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_interval"]; + portal_account_user_limit_rps?: components["parameters"]["rowFilter.portal_accounts.portal_account_user_limit_rps"]; + billing_type?: components["parameters"]["rowFilter.portal_accounts.billing_type"]; + /** @description Stripe subscription identifier for billing */ + stripe_subscription_id?: components["parameters"]["rowFilter.portal_accounts.stripe_subscription_id"]; + gcp_account_id?: components["parameters"]["rowFilter.portal_accounts.gcp_account_id"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_accounts.gcp_entitlement_id"]; + deleted_at?: components["parameters"]["rowFilter.portal_accounts.deleted_at"]; + created_at?: components["parameters"]["rowFilter.portal_accounts.created_at"]; + updated_at?: components["parameters"]["rowFilter.portal_accounts.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_accounts"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/organizations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Companies or customer groups that can be attached to Portal Accounts */ + get: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["organizations"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"][]; + "application/vnd.pgrst.object+json": components["schemas"]["organizations"][]; + "text/csv": components["schemas"]["organizations"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Companies or customer groups that can be attached to Portal Accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["organizations"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Companies or customer groups that can be attached to Portal Accounts */ + delete: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Companies or customer groups that can be attached to Portal Accounts */ + patch: { + parameters: { + query?: { + organization_id?: components["parameters"]["rowFilter.organizations.organization_id"]; + /** @description Name of the organization */ + organization_name?: components["parameters"]["rowFilter.organizations.organization_name"]; + /** @description Soft delete timestamp */ + deleted_at?: components["parameters"]["rowFilter.organizations.deleted_at"]; + created_at?: components["parameters"]["rowFilter.organizations.created_at"]; + updated_at?: components["parameters"]["rowFilter.organizations.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["organizations"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/networks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + get: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["networks"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"][]; + "application/vnd.pgrst.object+json": components["schemas"]["networks"][]; + "text/csv": components["schemas"]["networks"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["networks"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + delete: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + patch: { + parameters: { + query?: { + network_id?: components["parameters"]["rowFilter.networks.network_id"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["networks"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/portal_workers_account_data": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' */ + get: { + parameters: { + query?: { + portal_account_id?: components["parameters"]["rowFilter.portal_workers_account_data.portal_account_id"]; + user_account_name?: components["parameters"]["rowFilter.portal_workers_account_data.user_account_name"]; + portal_plan_type?: components["parameters"]["rowFilter.portal_workers_account_data.portal_plan_type"]; + billing_type?: components["parameters"]["rowFilter.portal_workers_account_data.billing_type"]; + portal_account_user_limit?: components["parameters"]["rowFilter.portal_workers_account_data.portal_account_user_limit"]; + gcp_entitlement_id?: components["parameters"]["rowFilter.portal_workers_account_data.gcp_entitlement_id"]; + owner_email?: components["parameters"]["rowFilter.portal_workers_account_data.owner_email"]; + owner_user_id?: components["parameters"]["rowFilter.portal_workers_account_data.owner_user_id"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_workers_account_data"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_workers_account_data"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_workers_account_data"][]; + "text/csv": components["schemas"]["portal_workers_account_data"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/portal_account_rbac": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** User roles and permissions for specific portal accounts */ + get: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_account_rbac.id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_account_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_user_id"]; + role_name?: components["parameters"]["rowFilter.portal_account_rbac.role_name"]; + user_joined_account?: components["parameters"]["rowFilter.portal_account_rbac.user_joined_account"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["portal_account_rbac"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_account_rbac"][]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_account_rbac"][]; + "text/csv": components["schemas"]["portal_account_rbac"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** User roles and permissions for specific portal accounts */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_account_rbac"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** User roles and permissions for specific portal accounts */ + delete: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_account_rbac.id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_account_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_user_id"]; + role_name?: components["parameters"]["rowFilter.portal_account_rbac.role_name"]; + user_joined_account?: components["parameters"]["rowFilter.portal_account_rbac.user_joined_account"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** User roles and permissions for specific portal accounts */ + patch: { + parameters: { + query?: { + id?: components["parameters"]["rowFilter.portal_account_rbac.id"]; + portal_account_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_account_id"]; + portal_user_id?: components["parameters"]["rowFilter.portal_account_rbac.portal_user_id"]; + role_name?: components["parameters"]["rowFilter.portal_account_rbac.role_name"]; + user_joined_account?: components["parameters"]["rowFilter.portal_account_rbac.user_joined_account"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["portal_account_rbac"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/service_endpoints": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Available endpoint types for each service */ + get: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + /** @description Ordering */ + order?: components["parameters"]["order"]; + /** @description Limiting and Pagination */ + offset?: components["parameters"]["offset"]; + /** @description Limiting and Pagination */ + limit?: components["parameters"]["limit"]; + }; + header?: { + /** @description Limiting and Pagination */ + Range?: components["parameters"]["range"]; + /** @description Limiting and Pagination */ + "Range-Unit"?: components["parameters"]["rangeUnit"]; + /** @description Preference */ + Prefer?: components["parameters"]["preferCount"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["service_endpoints"][]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"][]; + "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"][]; + "text/csv": components["schemas"]["service_endpoints"][]; + }; + }; + /** @description Partial Content */ + 206: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + /** Available endpoint types for each service */ + post: { + parameters: { + query?: { + /** @description Filtering Columns */ + select?: components["parameters"]["select"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferPost"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_endpoints"]; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + /** Available endpoint types for each service */ + delete: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + options?: never; + head?: never; + /** Available endpoint types for each service */ + patch: { + parameters: { + query?: { + endpoint_id?: components["parameters"]["rowFilter.service_endpoints.endpoint_id"]; + service_id?: components["parameters"]["rowFilter.service_endpoints.service_id"]; + endpoint_type?: components["parameters"]["rowFilter.service_endpoints.endpoint_type"]; + created_at?: components["parameters"]["rowFilter.service_endpoints.created_at"]; + updated_at?: components["parameters"]["rowFilter.service_endpoints.updated_at"]; + }; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferReturn"]; + }; + path?: never; + cookie?: never; + }; + requestBody?: components["requestBodies"]["service_endpoints"]; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + trace?: never; + }; + "/rpc/gen_salt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query: { + "": string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: components["requestBodies"]["Args2"]; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/pgp_armor_headers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query: { + "": string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: components["requestBodies"]["Args2"]; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/armor": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query: { + "": string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: components["requestBodies"]["Args"]; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/pgp_key_id": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query: { + "": string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: components["requestBodies"]["Args"]; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/dearmor": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query: { + "": string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: components["requestBodies"]["Args2"]; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/rpc/gen_random_uuid": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: { + /** @description Preference */ + Prefer?: components["parameters"]["preferParams"]; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": Record; + "application/vnd.pgrst.object+json;nulls=stripped": Record; + "application/vnd.pgrst.object+json": Record; + "text/csv": Record; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** @description Fallback URLs for services when primary endpoints fail */ + service_fallbacks: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + service_fallback_id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `services.service_id`. + */ + service_id: string; + /** Format: character varying */ + fallback_url: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description User access controls for specific applications */ + portal_application_rbac: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_applications.portal_application_id`. + */ + portal_application_id: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + */ + portal_user_id: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Available subscription plans for Portal Accounts */ + portal_plans: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + portal_plan_type: string; + /** Format: character varying */ + portal_plan_type_description?: string; + /** + * Format: integer + * @description Maximum usage allowed within the interval + */ + plan_usage_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + plan_usage_limit_interval?: "day" | "month" | "year"; + /** + * Format: integer + * @description Rate limit in requests per second + */ + plan_rate_limit_rps?: number; + /** Format: integer */ + plan_application_limit?: number; + }; + /** @description Users who can access the portal and belong to multiple accounts */ + portal_users: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + portal_user_id: string; + /** + * Format: character varying + * @description Unique email address for the user + */ + portal_user_email: string; + /** @default false */ + signed_up: boolean; + /** + * @description Whether user has admin privileges across the portal + * @default false + */ + portal_admin: boolean; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Applications created within portal accounts with their own rate limits and settings */ + portal_applications: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + * @default gen_random_uuid() + */ + portal_application_id: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + */ + portal_account_id: string; + /** Format: character varying */ + portal_application_name?: string; + /** Format: character varying */ + emoji?: string; + /** Format: integer */ + portal_application_user_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + portal_application_user_limit_interval?: "day" | "month" | "year"; + /** Format: integer */ + portal_application_user_limit_rps?: number; + /** Format: character varying */ + portal_application_description?: string; + /** Format: character varying[] */ + favorite_service_ids?: string[]; + /** + * Format: character varying + * @description Hashed secret key for application authentication + */ + secret_key_hash?: string; + /** @default false */ + secret_key_required: boolean; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Supported blockchain services from the Pocket Network */ + services: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + service_id: string; + /** Format: character varying */ + service_name: string; + /** + * Format: integer + * @description Cost in compute units for each relay + */ + compute_units_per_relay?: number; + /** + * Format: character varying[] + * @description Valid domains for this service + */ + service_domains: string[]; + /** Format: character varying */ + service_owner_address?: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `networks.network_id`. + */ + network_id?: string; + /** @default false */ + active: boolean; + /** @default false */ + beta: boolean; + /** @default false */ + coming_soon: boolean; + /** @default false */ + quality_fallback_enabled: boolean; + /** @default false */ + hard_fallback_enabled: boolean; + /** Format: text */ + svg_icon?: string; + /** Format: character varying */ + public_endpoint_url?: string; + /** Format: character varying */ + status_endpoint_url?: string; + /** Format: text */ + status_query?: string; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Multi-tenant accounts with plans and billing integration */ + portal_accounts: { + /** + * Format: character varying + * @description Unique identifier for the portal account + * + * Note: + * This is a Primary Key. + * @default gen_random_uuid() + */ + portal_account_id: string; + /** + * Format: integer + * @description Note: + * This is a Foreign Key to `organizations.organization_id`. + */ + organization_id?: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + */ + portal_plan_type: string; + /** Format: character varying */ + user_account_name?: string; + /** Format: character varying */ + internal_account_name?: string; + /** Format: integer */ + portal_account_user_limit?: number; + /** + * Format: public.plan_interval + * @enum {string} + */ + portal_account_user_limit_interval?: "day" | "month" | "year"; + /** Format: integer */ + portal_account_user_limit_rps?: number; + /** Format: character varying */ + billing_type?: string; + /** + * Format: character varying + * @description Stripe subscription identifier for billing + */ + stripe_subscription_id?: string; + /** Format: character varying */ + gcp_account_id?: string; + /** Format: character varying */ + gcp_entitlement_id?: string; + /** Format: timestamp with time zone */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Companies or customer groups that can be attached to Portal Accounts */ + organizations: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + organization_id: number; + /** + * Format: character varying + * @description Name of the organization + */ + organization_name: string; + /** + * Format: timestamp with time zone + * @description Soft delete timestamp + */ + deleted_at?: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + /** @description Supported blockchain networks (Pocket mainnet, testnet, etc.) */ + networks: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + network_id: string; + }; + /** @description Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = 'PLAN_UNLIMITED' AND billing_type = 'stripe' */ + portal_workers_account_data: { + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + portal_account_id?: string; + /** Format: character varying */ + user_account_name?: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_plans.portal_plan_type`. + */ + portal_plan_type?: string; + /** Format: character varying */ + billing_type?: string; + /** Format: integer */ + portal_account_user_limit?: number; + /** Format: character varying */ + gcp_entitlement_id?: string; + /** Format: character varying */ + owner_email?: string; + /** + * Format: character varying + * @description Note: + * This is a Primary Key. + */ + owner_user_id?: string; + }; + /** @description User roles and permissions for specific portal accounts */ + portal_account_rbac: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_accounts.portal_account_id`. + */ + portal_account_id: string; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `portal_users.portal_user_id`. + */ + portal_user_id: string; + /** Format: character varying */ + role_name: string; + /** @default false */ + user_joined_account: boolean; + }; + /** @description Available endpoint types for each service */ + service_endpoints: { + /** + * Format: integer + * @description Note: + * This is a Primary Key. + */ + endpoint_id: number; + /** + * Format: character varying + * @description Note: + * This is a Foreign Key to `services.service_id`. + */ + service_id: string; + /** + * Format: public.endpoint_type + * @enum {string} + */ + endpoint_type?: "cometBFT" | "cosmos" | "REST" | "JSON-RPC" | "WSS" | "gRPC"; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + created_at: string; + /** + * Format: timestamp with time zone + * @default CURRENT_TIMESTAMP + */ + updated_at: string; + }; + }; + responses: never; + parameters: { + /** @description Preference */ + preferParams: "params=single-object"; + /** @description Preference */ + preferReturn: "return=representation" | "return=minimal" | "return=none"; + /** @description Preference */ + preferCount: "count=none"; + /** @description Preference */ + preferPost: "return=representation" | "return=minimal" | "return=none" | "resolution=ignore-duplicates" | "resolution=merge-duplicates"; + /** @description Filtering Columns */ + select: string; + /** @description On Conflict */ + on_conflict: string; + /** @description Ordering */ + order: string; + /** @description Limiting and Pagination */ + range: string; + /** @description Limiting and Pagination */ + rangeUnit: string; + /** @description Limiting and Pagination */ + offset: string; + /** @description Limiting and Pagination */ + limit: string; + "rowFilter.service_fallbacks.service_fallback_id": string; + "rowFilter.service_fallbacks.service_id": string; + "rowFilter.service_fallbacks.fallback_url": string; + "rowFilter.service_fallbacks.created_at": string; + "rowFilter.service_fallbacks.updated_at": string; + "rowFilter.portal_application_rbac.id": string; + "rowFilter.portal_application_rbac.portal_application_id": string; + "rowFilter.portal_application_rbac.portal_user_id": string; + "rowFilter.portal_application_rbac.created_at": string; + "rowFilter.portal_application_rbac.updated_at": string; + "rowFilter.portal_plans.portal_plan_type": string; + "rowFilter.portal_plans.portal_plan_type_description": string; + /** @description Maximum usage allowed within the interval */ + "rowFilter.portal_plans.plan_usage_limit": string; + "rowFilter.portal_plans.plan_usage_limit_interval": string; + /** @description Rate limit in requests per second */ + "rowFilter.portal_plans.plan_rate_limit_rps": string; + "rowFilter.portal_plans.plan_application_limit": string; + "rowFilter.portal_users.portal_user_id": string; + /** @description Unique email address for the user */ + "rowFilter.portal_users.portal_user_email": string; + "rowFilter.portal_users.signed_up": string; + /** @description Whether user has admin privileges across the portal */ + "rowFilter.portal_users.portal_admin": string; + "rowFilter.portal_users.deleted_at": string; + "rowFilter.portal_users.created_at": string; + "rowFilter.portal_users.updated_at": string; + "rowFilter.portal_applications.portal_application_id": string; + "rowFilter.portal_applications.portal_account_id": string; + "rowFilter.portal_applications.portal_application_name": string; + "rowFilter.portal_applications.emoji": string; + "rowFilter.portal_applications.portal_application_user_limit": string; + "rowFilter.portal_applications.portal_application_user_limit_interval": string; + "rowFilter.portal_applications.portal_application_user_limit_rps": string; + "rowFilter.portal_applications.portal_application_description": string; + "rowFilter.portal_applications.favorite_service_ids": string; + /** @description Hashed secret key for application authentication */ + "rowFilter.portal_applications.secret_key_hash": string; + "rowFilter.portal_applications.secret_key_required": string; + "rowFilter.portal_applications.deleted_at": string; + "rowFilter.portal_applications.created_at": string; + "rowFilter.portal_applications.updated_at": string; + "rowFilter.services.service_id": string; + "rowFilter.services.service_name": string; + /** @description Cost in compute units for each relay */ + "rowFilter.services.compute_units_per_relay": string; + /** @description Valid domains for this service */ + "rowFilter.services.service_domains": string; + "rowFilter.services.service_owner_address": string; + "rowFilter.services.network_id": string; + "rowFilter.services.active": string; + "rowFilter.services.beta": string; + "rowFilter.services.coming_soon": string; + "rowFilter.services.quality_fallback_enabled": string; + "rowFilter.services.hard_fallback_enabled": string; + "rowFilter.services.svg_icon": string; + "rowFilter.services.public_endpoint_url": string; + "rowFilter.services.status_endpoint_url": string; + "rowFilter.services.status_query": string; + "rowFilter.services.deleted_at": string; + "rowFilter.services.created_at": string; + "rowFilter.services.updated_at": string; + /** @description Unique identifier for the portal account */ + "rowFilter.portal_accounts.portal_account_id": string; + "rowFilter.portal_accounts.organization_id": string; + "rowFilter.portal_accounts.portal_plan_type": string; + "rowFilter.portal_accounts.user_account_name": string; + "rowFilter.portal_accounts.internal_account_name": string; + "rowFilter.portal_accounts.portal_account_user_limit": string; + "rowFilter.portal_accounts.portal_account_user_limit_interval": string; + "rowFilter.portal_accounts.portal_account_user_limit_rps": string; + "rowFilter.portal_accounts.billing_type": string; + /** @description Stripe subscription identifier for billing */ + "rowFilter.portal_accounts.stripe_subscription_id": string; + "rowFilter.portal_accounts.gcp_account_id": string; + "rowFilter.portal_accounts.gcp_entitlement_id": string; + "rowFilter.portal_accounts.deleted_at": string; + "rowFilter.portal_accounts.created_at": string; + "rowFilter.portal_accounts.updated_at": string; + "rowFilter.organizations.organization_id": string; + /** @description Name of the organization */ + "rowFilter.organizations.organization_name": string; + /** @description Soft delete timestamp */ + "rowFilter.organizations.deleted_at": string; + "rowFilter.organizations.created_at": string; + "rowFilter.organizations.updated_at": string; + "rowFilter.networks.network_id": string; + "rowFilter.portal_workers_account_data.portal_account_id": string; + "rowFilter.portal_workers_account_data.user_account_name": string; + "rowFilter.portal_workers_account_data.portal_plan_type": string; + "rowFilter.portal_workers_account_data.billing_type": string; + "rowFilter.portal_workers_account_data.portal_account_user_limit": string; + "rowFilter.portal_workers_account_data.gcp_entitlement_id": string; + "rowFilter.portal_workers_account_data.owner_email": string; + "rowFilter.portal_workers_account_data.owner_user_id": string; + "rowFilter.portal_account_rbac.id": string; + "rowFilter.portal_account_rbac.portal_account_id": string; + "rowFilter.portal_account_rbac.portal_user_id": string; + "rowFilter.portal_account_rbac.role_name": string; + "rowFilter.portal_account_rbac.user_joined_account": string; + "rowFilter.service_endpoints.endpoint_id": string; + "rowFilter.service_endpoints.service_id": string; + "rowFilter.service_endpoints.endpoint_type": string; + "rowFilter.service_endpoints.created_at": string; + "rowFilter.service_endpoints.updated_at": string; + }; + requestBodies: { + /** @description portal_accounts */ + portal_accounts: { + content: { + "application/json": components["schemas"]["portal_accounts"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_accounts"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_accounts"]; + "text/csv": components["schemas"]["portal_accounts"]; + }; + }; + /** @description networks */ + networks: { + content: { + "application/json": components["schemas"]["networks"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["networks"]; + "application/vnd.pgrst.object+json": components["schemas"]["networks"]; + "text/csv": components["schemas"]["networks"]; + }; + }; + /** @description portal_users */ + portal_users: { + content: { + "application/json": components["schemas"]["portal_users"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_users"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_users"]; + "text/csv": components["schemas"]["portal_users"]; + }; + }; + /** @description service_endpoints */ + service_endpoints: { + content: { + "application/json": components["schemas"]["service_endpoints"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_endpoints"]; + "application/vnd.pgrst.object+json": components["schemas"]["service_endpoints"]; + "text/csv": components["schemas"]["service_endpoints"]; + }; + }; + Args: { + content: { + "application/json": { + /** Format: bytea */ + "": string; + }; + "application/vnd.pgrst.object+json;nulls=stripped": { + /** Format: bytea */ + "": string; + }; + "application/vnd.pgrst.object+json": { + /** Format: bytea */ + "": string; + }; + "text/csv": { + /** Format: bytea */ + "": string; + }; + }; + }; + /** @description portal_applications */ + portal_applications: { + content: { + "application/json": components["schemas"]["portal_applications"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_applications"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_applications"]; + "text/csv": components["schemas"]["portal_applications"]; + }; + }; + /** @description portal_account_rbac */ + portal_account_rbac: { + content: { + "application/json": components["schemas"]["portal_account_rbac"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_account_rbac"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_account_rbac"]; + "text/csv": components["schemas"]["portal_account_rbac"]; + }; + }; + /** @description service_fallbacks */ + service_fallbacks: { + content: { + "application/json": components["schemas"]["service_fallbacks"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["service_fallbacks"]; + "application/vnd.pgrst.object+json": components["schemas"]["service_fallbacks"]; + "text/csv": components["schemas"]["service_fallbacks"]; + }; + }; + /** @description portal_application_rbac */ + portal_application_rbac: { + content: { + "application/json": components["schemas"]["portal_application_rbac"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_application_rbac"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_application_rbac"]; + "text/csv": components["schemas"]["portal_application_rbac"]; + }; + }; + /** @description portal_plans */ + portal_plans: { + content: { + "application/json": components["schemas"]["portal_plans"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["portal_plans"]; + "application/vnd.pgrst.object+json": components["schemas"]["portal_plans"]; + "text/csv": components["schemas"]["portal_plans"]; + }; + }; + /** @description services */ + services: { + content: { + "application/json": components["schemas"]["services"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["services"]; + "application/vnd.pgrst.object+json": components["schemas"]["services"]; + "text/csv": components["schemas"]["services"]; + }; + }; + /** @description organizations */ + organizations: { + content: { + "application/json": components["schemas"]["organizations"]; + "application/vnd.pgrst.object+json;nulls=stripped": components["schemas"]["organizations"]; + "application/vnd.pgrst.object+json": components["schemas"]["organizations"]; + "text/csv": components["schemas"]["organizations"]; + }; + }; + Args2: { + content: { + "application/json": { + /** Format: text */ + "": string; + }; + "application/vnd.pgrst.object+json;nulls=stripped": { + /** Format: text */ + "": string; + }; + "application/vnd.pgrst.object+json": { + /** Format: text */ + "": string; + }; + "text/csv": { + /** Format: text */ + "": string; + }; + }; + }; + }; + headers: never; + pathItems: never; +} +export type $defs = Record; +export type operations = Record; From 0e2004cd3a09e7fff4ae0a70107bf79e60da2f15 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Thu, 9 Oct 2025 15:50:57 +0100 Subject: [PATCH 40/43] rename grove backend sql file --- portal-db/docker-compose.yml | 4 ++-- .../{003_aux_services_queries.sql => 003_grove_backend.sql} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename portal-db/schema/{003_aux_services_queries.sql => 003_grove_backend.sql} (100%) diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index 7059462e8..ddf3385e5 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -48,8 +48,8 @@ services: - ./schema/001_portal_init.sql:/docker-entrypoint-initdb.d/001_portal_init.sql:ro # 002_postgrest_init.sql: PostgREST API setup (roles, permissions, JWT) - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro - # 003_aux_services_queries.sql: Auxiliary services queries - - ./schema/003_aux_services_queries.sql:/docker-entrypoint-initdb.d/003_aux_services_queries.sql:ro + # 003_grove_backend.sql: Grove backend queries + - ./schema/003_grove_backend.sql:/docker-entrypoint-initdb.d/003_grove_backend.sql:ro # 2. LOCAL DEV ONLY: mount set_authenticator_password.sql: Set authenticator password # - Required to set the authenticator role's password to 'authenticator_password' for the local development environment. diff --git a/portal-db/schema/003_aux_services_queries.sql b/portal-db/schema/003_grove_backend.sql similarity index 100% rename from portal-db/schema/003_aux_services_queries.sql rename to portal-db/schema/003_grove_backend.sql From 5cfbfa81835902723ff84ed7ba6353137ec5da18 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Thu, 9 Oct 2025 20:33:02 +0100 Subject: [PATCH 41/43] add openapi-react-query to example --- portal-db/schema/004_grove_portal.sql | 0 portal-db/sdk/typescript/README.md | 51 ++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 portal-db/schema/004_grove_portal.sql diff --git a/portal-db/schema/004_grove_portal.sql b/portal-db/schema/004_grove_portal.sql new file mode 100644 index 000000000..e69de29bb diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 97892e69c..131f2ce8a 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -2,7 +2,7 @@ Type-safe TypeScript client for the Portal DB API, generated from OpenAPI specification using [openapi-typescript](https://github.com/openapi-ts/openapi-typescript) and [openapi-fetch](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch). -## Installation +## **Installation** ```bash npm install openapi-fetch @@ -47,9 +47,58 @@ const { data, error } = await client.GET('/services', { }); ``` +### React with @tanstack/react-query + +For React applications, you can use [openapi-react-query](https://openapi-ts.dev/openapi-react-query/) for a type-safe wrapper around React Query: + +```bash +npm install openapi-react-query openapi-fetch @tanstack/react-query +``` + +```typescript +import createFetchClient from 'openapi-fetch'; +import createClient from 'openapi-react-query'; +import type { paths } from './types'; + +const fetchClient = createFetchClient({ + baseUrl: 'http://localhost:3000', + headers: { + 'Authorization': `Bearer ${JWT_TOKEN}`, + }, +}); + +const $api = createClient(fetchClient); + +const ServicesComponent = () => { + const { data, error, isLoading } = $api.useQuery( + 'get', + '/services', + { + params: { + query: { + active: 'eq.true', + } + } + } + ); + + if (isLoading || !data) return 'Loading...'; + if (error) return `Error: ${error.message}`; + + return ( +
+ {data.map(service => ( +
{service.service_id}
+ ))} +
+ ); +}; +``` + ## Documentation - **openapi-fetch**: https://openapi-ts.dev/openapi-fetch/ +- **openapi-react-query**: https://openapi-ts.dev/openapi-react-query/ - **PostgREST API Reference**: https://postgrest.org/en/stable/references/api/tables_views.html ## Type Safety From 77b4d662baa1db3c7b9a286484d1e1c2bed012de Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Thu, 9 Oct 2025 20:37:15 +0100 Subject: [PATCH 42/43] use NPM package name in README.md --- portal-db/sdk/typescript/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/portal-db/sdk/typescript/README.md b/portal-db/sdk/typescript/README.md index 131f2ce8a..673d25028 100644 --- a/portal-db/sdk/typescript/README.md +++ b/portal-db/sdk/typescript/README.md @@ -1,5 +1,7 @@ # Portal DB TypeScript SDK + + Type-safe TypeScript client for the Portal DB API, generated from OpenAPI specification using [openapi-typescript](https://github.com/openapi-ts/openapi-typescript) and [openapi-fetch](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch). ## **Installation** @@ -14,7 +16,7 @@ npm install openapi-fetch ```typescript import createClient from 'openapi-fetch'; -import type { paths } from './types'; +import type { paths } from '@buildwithgrove/portal-db-ts-sdk'; const client = createClient({ baseUrl: 'http://localhost:3000', @@ -58,7 +60,7 @@ npm install openapi-react-query openapi-fetch @tanstack/react-query ```typescript import createFetchClient from 'openapi-fetch'; import createClient from 'openapi-react-query'; -import type { paths } from './types'; +import type { paths } from '@buildwithgrove/portal-db-ts-sdk'; const fetchClient = createFetchClient({ baseUrl: 'http://localhost:3000', From 51fb8dcbfbcde1397d93841c74f5bbc0c4210807 Mon Sep 17 00:00:00 2001 From: Pascal van Leeuwen Date: Fri, 10 Oct 2025 20:44:17 +0100 Subject: [PATCH 43/43] add Auth0 JWT portal DB access config for portal UI access --- .gitignore | 5 +- portal-db/Makefile | 73 +++-- portal-db/api/README.md | 78 ++++- portal-db/api/postgrest.conf | 113 ++++--- portal-db/api/scripts/postgrest-gen-jwt.sh | 249 ++++++++++----- portal-db/docker-compose.yml | 5 + portal-db/schema/003_grove_backend.sql | 5 +- portal-db/schema/004_grove_portal.sql | 0 portal-db/schema/004_grove_portal_access.sql | 300 +++++++++++++++++++ 9 files changed, 666 insertions(+), 162 deletions(-) delete mode 100644 portal-db/schema/004_grove_portal.sql create mode 100644 portal-db/schema/004_grove_portal_access.sql diff --git a/.gitignore b/.gitignore index 2b0886c6d..41c0fd941 100644 --- a/.gitignore +++ b/.gitignore @@ -87,4 +87,7 @@ pg_dump.sql bench_results # Node Modules (Portal DBTypeScript SDK) -node_modules \ No newline at end of file +node_modules + +# JWKS file +jwks.json \ No newline at end of file diff --git a/portal-db/Makefile b/portal-db/Makefile index 9b1844e02..bc85efbce 100644 --- a/portal-db/Makefile +++ b/portal-db/Makefile @@ -19,24 +19,7 @@ GREEN := \033[0;32m JWT_ROLE ?= portal_db_admin JWT_EMAIL ?= john@doe.com - -SECOND_GOAL := $(word 2,$(MAKECMDGOALS)) - -ifeq ($(SECOND_GOAL),admin) - JWT_ROLE := portal_db_admin -endif - -ifeq ($(SECOND_GOAL),reader) - JWT_ROLE := portal_db_reader -endif - -ifdef ROLE - JWT_ROLE := $(ROLE) -endif - -ifdef EMAIL - JWT_EMAIL := $(EMAIL) -endif +JWT_EXPIRES ?= 1h # ============================================================================ # HELP @@ -58,7 +41,7 @@ help: ## Show all available targets @grep -h -E '^(postgrest-hydrate-testdata|hydrate-services|hydrate-applications|hydrate-gateways|hydrate-prod|dehydrate-reset-db):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' @echo "" @echo "$(BOLD)=== ๐Ÿ” Authentication & Testing ===$(RESET)" - @grep -h -E '^(test-postgrest-auth|test-postgrest-portal-app-creation|postgrest-gen-jwt):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' + @grep -h -E '^(test-postgrest-auth|test-postgrest-portal-app-creation|postgrest-gen-jwt|grove-download-jwks|check-jwks):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' @echo "" @echo "$(BOLD)=== ๐Ÿ“ API Generation ===$(RESET)" @grep -h -E '^(postgrest-generate-openapi|postgrest-swagger-ui|postgrest-generate-sdks|postgrest-generate-all):.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(RESET) %s\n", $$1, $$2}' @@ -81,8 +64,10 @@ quickstart: ## Quick start guide for Portal DB (shows commands to run) @echo "$(CYAN) make postgrest-hydrate-testdata$(RESET)" @echo "" @echo "$(BOLD)Step 3: Generate JWT tokens$(RESET)" - @echo "$(CYAN) make postgrest-gen-jwt admin$(RESET)" - @echo " # Optionally, generate reader token: $(CYAN)make postgrest-gen-jwt reader$(RESET)" + @echo "$(CYAN) make postgrest-gen-jwt$(RESET) # Defaults to admin role" + @echo " # Optionally, generate reader token: $(CYAN)JWT_ROLE=reader make postgrest-gen-jwt$(RESET)" + @echo " # With custom email: $(CYAN)JWT_EMAIL=user@example.com make postgrest-gen-jwt$(RESET)" + @echo " # With custom expiry: $(CYAN)JWT_EXPIRES=24h make postgrest-gen-jwt$(RESET)" @echo "" @echo "$(BOLD)Step 4: Export JWT token$(RESET)" @echo "$(YELLOW) # Copy the export commands from the previous output$(RESET)" @@ -128,7 +113,7 @@ quickstart: ## Quick start guide for Portal DB (shows commands to run) # ============================================================================ .PHONY: portal-db-up -portal-db-up: ## Start all Portal DB services +portal-db-up: check-jwks ## Start all Portal DB services @echo "๐Ÿš€ Starting all Portal DB services..." docker compose up -d @echo "โœ… Services started!" @@ -137,6 +122,14 @@ portal-db-up: ## Start all Portal DB services @echo "" @echo "๐Ÿ”ง You can connect to the database using:" @echo " $(CYAN)psql 'postgresql://postgres:portal_password@localhost:5435/portal_db'$(RESET)" + @echo "" + @echo "๐Ÿ” To test the API with authentication:" + @echo " 1. Generate a JWT token:" + @echo " $(CYAN)make postgrest-gen-jwt$(RESET)" + @echo " 2. Export the token (copy from output above):" + @echo " $(CYAN)export POSTGREST_JWT_TOKEN=\"eyJ...\"$(RESET)" + @echo " 3. Make an authenticated request:" + @echo " $(CYAN)curl -H \"Authorization: Bearer \$$POSTGREST_JWT_TOKEN\" \"http://localhost:3000/networks\" | jq '.'$(RESET)" .PHONY: portal-db-down portal-db-down: ## Stop all Portal DB services @@ -203,16 +196,34 @@ test-postgrest-portal-app-creation: _require-postgrest-api ## Test portal applic cd api/scripts && ./test-postgrest-portal-app-creation.sh .PHONY: postgrest-gen-jwt -postgrest-gen-jwt: _require-postgrest-api ## Generate JWT token +postgrest-gen-jwt: _require-postgrest-api ## Generate JWT token (use JWT_ROLE=admin JWT_EMAIL=user@example.com JWT_EXPIRES=24h to customize) @echo "๐Ÿ”‘ Generating JWT token..." - cd api/scripts && ./postgrest-gen-jwt.sh $(JWT_ROLE) $(JWT_EMAIL) - -.PHONY: admin reader -admin: - @: - -reader: - @: + cd api/scripts && ./postgrest-gen-jwt.sh --role $(JWT_ROLE) --email $(JWT_EMAIL) --expires $(JWT_EXPIRES) + +.PHONY: grove-download-jwks +grove-download-jwks: ## ๐ŸŒฟ GROVE EMPLOYEES ONLY - Download JWKS from 1Password to api/jwks.json + @echo "๐ŸŒฟ $(BOLD)GROVE EMPLOYEES ONLY$(RESET)" + @echo "๐Ÿ” Downloading JWKS from 1Password..." + @if ! command -v op >/dev/null 2>&1; then \ + echo "โŒ 1Password CLI (op) is not installed. Please install it first:"; \ + echo " brew install 1password-cli"; \ + exit 1; \ + fi + @op item get 6hh3pjg7m2qdpkg26kf6gzmjs4 --format json | jq -r '.fields[] | select(.id == "notesPlain") | .value' | jq '.' > api/jwks.json + @echo "โœ… JWKS downloaded to api/jwks.json" + +.PHONY: check-jwks +check-jwks: ## Check if api/jwks.json exists, show instructions if missing + @if [ ! -f api/jwks.json ]; then \ + echo "โŒ $(YELLOW)api/jwks.json not found!$(RESET)"; \ + echo ""; \ + echo "$(BOLD)๐ŸŒฟ GROVE EMPLOYEES: Download the JWKS file from 1Password:$(RESET)"; \ + echo " $(CYAN)make grove-download-jwks$(RESET)"; \ + echo ""; \ + echo "$(YELLOW)Note: Requires 1Password CLI (op) to be installed and authenticated.$(RESET)"; \ + exit 1; \ + fi + @echo "โœ… api/jwks.json found" # ============================================================================ # DATA HYDRATION diff --git a/portal-db/api/README.md b/portal-db/api/README.md index a3ff2ad88..8f80ceed3 100644 --- a/portal-db/api/README.md +++ b/portal-db/api/README.md @@ -10,9 +10,11 @@ PostgREST automatically generates a REST API from the PostgreSQL database schema - [Walkthrough](#walkthrough) - [Authentication](#authentication) - [Auth Summary](#auth-summary) - - [Database Roles Roles](#database-roles-roles) + - [JWKS Configuration](#jwks-configuration) + - [Database Roles](#database-roles) + - [Row-Level Security (RLS)](#row-level-security-rls) - [Testing auth locally](#testing-auth-locally) - - [JWT Generation](#jwt-generation) + - [JWT Generation (Backend/Internal Use)](#jwt-generation-backendinternal-use) - [How it Works](#how-it-works) - [๐Ÿ“š Resources](#-resources) @@ -65,22 +67,57 @@ make postgrest-swagger-ui ## Authentication -The PostgREST API is authenticated via the SQL migration in [002_postgrest_init.sql](../schema/002_postgrest_init.sql). +The PostgREST API uses **dual JWT authentication** to support both internal services and frontend users. ### Auth Summary -1. SSL Certs to connect to the DB -2. JWT to authenticate into the DB as a `portal_db_*` user -3. Top level roles authenticated into the DB subject to RLS (e.g. `portal_db_admin` or `portal_db_reader`) -4. Portal Application roles defined within the tables (see `rbac` of each table) +PostgREST authenticates requests using JWTs (JSON Web Tokens) with two different signing methods: -### Database Roles Roles +1. **Backend/Internal JWTs (HS256)** - For backend services and engineers + - Algorithm: HMAC-SHA256 (symmetric key) + - Use case: Internal tools, backend services, admin operations + - Roles: `portal_db_admin`, `portal_db_reader` + - Generated locally via `make postgrest-gen-jwt` + +2. **Auth0 User JWTs (RS256)** - For frontend users + - Algorithm: RSA-SHA256 (asymmetric key) + - Use case: Frontend application users authenticated via Auth0 + - Role: `authenticated_user` (with user-scoped RLS policies) + - Generated by Auth0 at https://auth.grove.city/ + +Both JWT types are verified using a **JWKS (JSON Web Key Set)** file that contains: +- HS256 symmetric key for backend JWTs (no `kid` in header) +- RS256 public key from Auth0 (with `kid="1a2b3c4d5e6f7g8h9i0j"` in header) + +### JWKS Configuration + +The JWKS file (`api/jwks.json`) is **gitignored** and contains sensitive key material. + +**๐ŸŒฟ GROVE EMPLOYEES ONLY:** +```bash +# Download JWKS from 1Password (requires 1Password CLI) +make grove-download-jwks +``` + +This command fetches the production JWKS file containing both the internal HS256 secret and the Auth0 RS256 public key. + +### Database Roles - `authenticator` - "Chameleon" role used exclusively by PostgREST for JWT authentication (no direct API access) -- `portal_db_admin` - JWT-backed role with read/write access (subject to RLS) -- `portal_db_reader` - JWT-backed role with read-only access (subject to RLS) +- `portal_db_admin` - JWT-backed role with full read/write access (backend services) +- `portal_db_reader` - JWT-backed role with read-only access (backend services) +- `authenticated_user` - JWT-backed role for Auth0 users with user-scoped RLS policies (see [004_grove_portal_access.sql](../schema/004_grove_portal_access.sql)) - `anon` - Default unauthenticated role with no privileges +### Row-Level Security (RLS) + +Frontend users authenticated via Auth0 are subject to **Row-Level Security** policies: +- Users can only access `portal_accounts` and `portal_applications` they have explicit RBAC permissions for +- Permission levels: `legacy_read` (SELECT) and `legacy_write` (INSERT/UPDATE/DELETE) +- Unauthorized access returns an empty array `[]` (by design, to prevent information leakage) + +See [004_grove_portal_access.sql](../schema/004_grove_portal_access.sql) for RLS policy details. + ### Testing auth locally Run `make` from the `portal-db` directory shows the following scripts which can be used to test things locally: @@ -92,16 +129,27 @@ test-postgrest-portal-app-creation Test portal application creation and retrieva postgrest-gen-jwt Generate JWT token ``` -### JWT Generation +### JWT Generation (Backend/Internal Use) + +The `postgrest-gen-jwt` script generates HS256 JWTs for backend services and internal development: ```bash -# Admin JWT -make postgrest-gen-jwt admin +# Generate admin JWT (full read/write access) +make postgrest-gen-jwt -# Reader JWT -make postgrest-gen-jwt reader +# Generate reader JWT (read-only access) +JWT_ROLE=portal_db_reader make postgrest-gen-jwt + +# Customize email, expiration +JWT_EMAIL=user@example.com JWT_EXPIRES=24h make postgrest-gen-jwt + +# Token-only output (for scripting) +export POSTGREST_JWT_TOKEN=$(cd api/scripts && ./postgrest-gen-jwt.sh --token-only) +curl -H "Authorization: Bearer $POSTGREST_JWT_TOKEN" http://localhost:3000/networks ``` +See `./api/scripts/postgrest-gen-jwt.sh --help` for full documentation. + ## How it Works **PostgREST** introspects PostgreSQL schema and auto-generates REST endpoints: diff --git a/portal-db/api/postgrest.conf b/portal-db/api/postgrest.conf index ed155abcc..eb993dafe 100644 --- a/portal-db/api/postgrest.conf +++ b/portal-db/api/postgrest.conf @@ -54,6 +54,22 @@ openapi-server-proxy-uri = "http://localhost:3000" # https://postgrest.org/en/stable/references/configuration.html#server-cors-allowed-origins server-cors-allowed-origins = "" +# ============================================================================ +# REQUEST CONFIGURATION +# ============================================================================ + +# Transaction end behavior - commit changes after each request +# https://postgrest.org/en/stable/references/configuration.html#db-tx-end +db-tx-end = "commit" + +# ============================================================================ +# CONNECTION POOL CONFIGURATION +# ============================================================================ + +# Maximum number of connections in the database pool +# https://postgrest.org/en/stable/references/configuration.html#db-pool +db-pool = 10 + # ============================================================================ # LOGGING CONFIGURATION # ============================================================================ @@ -63,58 +79,65 @@ server-cors-allowed-origins = "" log-level = "info" # ============================================================================ -# JWT AUTHENTICATION CONFIGURATION +# JWT AUTHENTICATION CONFIGURATION - DUAL KEY SETUP # ============================================================================ -# +# JWT role claim key - specifies which JWT claim contains the database role +# https://postgrest.org/en/stable/references/configuration.html#jwt-role-claim-key +# Both JWT types use the standard ".role" claim +jwt-role-claim-key = ".role" + # JWT VERIFICATION PROCESS (handled automatically by PostgREST): # 1. Client sends: Authorization: Bearer # 2. PostgREST extracts token from header -# 3. PostgREST verifies signature using jwt-secret below +# 3. PostgREST verifies signature using jwt-secret JWKS below # 4. If valid, PostgREST extracts claims from JWT payload # 5. PostgREST looks for role claim (specified by jwt-role-claim-key) # 6. PostgREST executes: SET ROLE ; # 7. PostgREST sets JWT claims as transaction-scoped settings # -# Example JWT payload generated by api/scripts/postgrest-gen-jwt.sh: -# { -# "role": "portal_db_admin", <- Used for SET ROLE command -# "email": "john@doe.com", <- Available via current_setting() -# "exp": 1758126390 <- Token expiration -# } - -# Secret for JWT token verification (32+ characters required) -# https://postgrest.org/en/stable/references/configuration.html#jwt-secret -# TODO_PRODUCTION: Use a secure random secret in production! -# MUST match the secret used in api/scripts/postgrest-gen-jwt.sh for token generation -jwt-secret = "supersecretjwtsecretforlocaldevelopment123456789" - -# JWT role claim key - specifies which JWT claim contains the database role -# https://postgrest.org/en/stable/references/configuration.html#jwt-role-claim-key -# The "." prefix indicates JSON path: payload.role -> "portal_db_admin" or "portal_db_reader" -jwt-role-claim-key = ".role" - -# JWT audience claim verification (optional security hardening) -# https://postgrest.org/en/stable/references/configuration.html#jwt-aud -# Ensures JWTs are intended specifically for this PostgREST API -jwt-aud = "postgrest" - -# ============================================================================ -# REQUEST CONFIGURATION -# ============================================================================ - -# Transaction end behavior - commit changes after each request -# https://postgrest.org/en/stable/references/configuration.html#db-tx-end -db-tx-end = "commit" - -# Pre-request hook to set statement timeout (prevents long-running queries) -# https://postgrest.org/en/stable/references/configuration.html#db-pre-request -# Uncomment in production to prevent runaway queries from blocking resources -# db-pre-request = "SET statement_timeout = '10s';" - -# ============================================================================ -# CONNECTION POOL CONFIGURATION -# ============================================================================ +# DUAL JWT SUPPORT: +# This configuration supports TWO types of JWTs simultaneously: +# +# 1. Backend/Internal JWTs (HS256): +# - Algorithm: HS256 (symmetric key) +# - No 'kid' in header +# - Example payload: +# { +# "role": "portal_db_admin", +# "email": "engineer@example.com", +# "exp": 1758126390 +# } +# +# 2. Auth0 User JWTs (RS256): +# - Generated by Auth0 +# - Algorithm: RS256 (asymmetric key) +# - 'kid': "1a2b3c4d5e6f7g8h9i0j" in header +# - Example payload: +# { +# "role": "authenticated_user", +# "sub": "auth0|1a2b3c4d5e6f7g8h9i0j", +# "aud": "https://api.eggs.town/", +# "exp": 1760197313 +# } +# +# PostgREST automatically routes to the correct key based on JWT header: +# - No 'kid' -> Uses HS256 key +# - kid="1a2b3c4d5e6f7g8h9i0j" -> Uses Auth0 RS256 key -# Maximum number of connections in the database pool -# https://postgrest.org/en/stable/references/configuration.html#db-pool -db-pool = 10 +# JWKS (JSON Web Key Set) containing both HS256 and RS256 keys +# https://postgrest.org/en/stable/references/configuration.html#jwt-secret +# +# IMPORTANT: The JWKS file contains: +# 1. HS256 key (no kid) for backend/internal JWTs +# - The 'k' value is the base64url encoding of the LITERAL SECRET STRING +# - NOT the decoded bytes of a base64 secret, but the string itself as ASCII bytes +# - Example: If JWT generator uses "mySecret123" as the HMAC key, +# then k = base64url("mySecret123") = "bXlTZWNyZXQxMjM" +# +# 2. RS256 key (kid="1a2b3c4d5e6f7g8h9i0j") for Auth0 user JWTs +# - Standard RSA public key in JWK format from Auth0 JWKS endpoint +# +# File location: Mounted in Docker at /etc/postgrest/jwks.json (see docker-compose.yml) +# Security: jwks.json is gitignored and contains all sensitive key material +# - /etc/postgrest/jwks.json is mounted in Docker from portal-db/api/jwks.json +jwt-secret = "@/etc/postgrest/jwks.json" diff --git a/portal-db/api/scripts/postgrest-gen-jwt.sh b/portal-db/api/scripts/postgrest-gen-jwt.sh index 78a08d35d..31b3587ac 100755 --- a/portal-db/api/scripts/postgrest-gen-jwt.sh +++ b/portal-db/api/scripts/postgrest-gen-jwt.sh @@ -9,12 +9,13 @@ # Reference: https://docs.postgrest.org/en/v13/tutorials/tut1.html # # Usage: -# ./postgrest-gen-jwt.sh # portal_db_admin role, sample email, 1h expiry -# ./postgrest-gen-jwt.sh portal_db_reader user@email # custom role + email -# ./postgrest-gen-jwt.sh --expires 24h # 24 hour expiry -# ./postgrest-gen-jwt.sh --expires never # Never expires -# ./postgrest-gen-jwt.sh --token-only portal_db_admin user@email -# ./postgrest-gen-jwt.sh --help # display usage information +# ./postgrest-gen-jwt.sh # Use defaults (reads secret from .env) +# ./postgrest-gen-jwt.sh --role reader --email user@email # Custom role and email +# ./postgrest-gen-jwt.sh --expires 24h # 24 hour expiry +# ./postgrest-gen-jwt.sh --expires never # Never expires +# ./postgrest-gen-jwt.sh --token-only # Output token only (for scripting) +# ./postgrest-gen-jwt.sh --secret YOUR_SECRET # Provide custom JWT secret +# ./postgrest-gen-jwt.sh --help # Display usage information set -e @@ -23,12 +24,25 @@ CYAN='\033[0;36m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' +RED='\033[0;31m' BOLD='\033[1m' RESET='\033[0m' -# JWT secret from postgrest.conf (must match exactly) -# TODO_PRODUCTION: Extract JWT_SECRET from postgrest.conf automatically to maintain single source of truth and avoid drift between files -JWT_SECRET="${JWT_SECRET:-supersecretjwtsecretforlocaldevelopment123456789}" +# Determine the script directory and portal-db root +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PORTAL_DB_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +# Try to load JWT secret from .env file +if [[ -f "$PORTAL_DB_ROOT/.env" ]]; then + # Source the .env file to get POSTGREST_JWT_SECRET + set -a + source "$PORTAL_DB_ROOT/.env" + set +a + + if [[ -n "$POSTGREST_JWT_SECRET" ]]; then + JWT_SECRET="$POSTGREST_JWT_SECRET" + fi +fi # Default values ROLE="portal_db_admin" @@ -36,76 +50,177 @@ EMAIL="john@doe.com" EXPIRES="1h" TOKEN_ONLY=false +# Show help function (defined early so it can be called during argument parsing) +print_help() { + cat < portal_db_admin + ${CYAN}reader${RESET} -> portal_db_reader + +${BOLD}DEPENDENCIES${RESET} + - openssl (for HMAC-SHA256 signing) + - base64 (for encoding) + - date (for expiration calculation) + +${BOLD}REFERENCE${RESET} + https://docs.postgrest.org/en/v13/tutorials/tut1.html + +EOF +} + # Parse arguments while [[ $# -gt 0 ]]; do case "$1" in + --help|-h) + print_help + exit 0 + ;; --token-only) TOKEN_ONLY=true shift ;; + --role) + if [[ -z "$2" || "$2" == --* ]]; then + echo -e "${RED}${BOLD}Error: --role requires a value${RESET}" >&2 + echo "Run with --help for usage information" >&2 + exit 1 + fi + ROLE="$2" + shift 2 + ;; + --email) + if [[ -z "$2" || "$2" == --* ]]; then + echo -e "${RED}${BOLD}Error: --email requires a value${RESET}" >&2 + echo "Run with --help for usage information" >&2 + exit 1 + fi + EMAIL="$2" + shift 2 + ;; --expires) + if [[ -z "$2" || "$2" == --* ]]; then + echo -e "${RED}${BOLD}Error: --expires requires a value${RESET}" >&2 + echo "Run with --help for usage information" >&2 + exit 1 + fi EXPIRES="$2" shift 2 ;; - --help|-h) - print_help - exit 0 + --secret) + if [[ -z "$2" || "$2" == --* ]]; then + echo -e "${RED}${BOLD}Error: --secret requires a value${RESET}" >&2 + echo "Run with --help for usage information" >&2 + exit 1 + fi + JWT_SECRET="$2" + shift 2 ;; *) - if [[ -z "$ROLE" || "$ROLE" == "portal_db_admin" ]]; then - ROLE="$1" - elif [[ "$EMAIL" == "john@doe.com" ]]; then - EMAIL="$1" - fi - shift + echo -e "${RED}${BOLD}Error: Unknown option '$1'${RESET}" >&2 + echo "Run with --help for usage information" >&2 + exit 1 ;; esac done -# Show help -print_help() { - cat <<'EOF' -Usage: postgrest-gen-jwt.sh [OPTIONS] [ROLE] [EMAIL] - -Options: - --help, -h Show this help message and exit - --token-only Print only the JWT for scripting - --expires DURATION Set token expiration (default: 1h) - Examples: 1h, 24h, 7d, 30d, never - -Role aliases: - admin Shortcut for portal_db_admin - reader Shortcut for portal_db_reader - -Positional arguments: - ROLE Database role to embed in the JWT (default: portal_db_admin) - EMAIL Email claim to embed in the JWT (default: john@doe.com) - -Expiration formats: - 1h, 2h, etc. Hours (e.g., 1h = 1 hour from now) - 1d, 7d, 30d Days (e.g., 7d = 7 days from now) - never Token never expires (no exp claim) - -Examples: - # Generate token with default 1 hour expiry - ./postgrest-gen-jwt.sh - - # Generate token with custom role and email - ./postgrest-gen-jwt.sh reader user@example.com - - # Generate token that expires in 24 hours - ./postgrest-gen-jwt.sh --expires 24h - - # Generate token that expires in 7 days - ./postgrest-gen-jwt.sh --expires 7d admin user@example.com - - # Generate token that never expires - ./postgrest-gen-jwt.sh --expires never - - # Generate token for scripting (token only output) - ./postgrest-gen-jwt.sh --token-only --expires never admin -EOF -} +# Validate that JWT_SECRET is available +if [[ -z "$JWT_SECRET" ]]; then + echo -e "${RED}${BOLD}โŒ Error: JWT secret not found${RESET}" >&2 + echo "" >&2 + echo -e "${BOLD}The JWT secret must be provided via one of the following methods:${RESET}" >&2 + echo "" >&2 + echo -e " ${CYAN}1.${RESET} Use the ${CYAN}--secret${RESET} flag:" >&2 + echo -e " ${CYAN}./postgrest-gen-jwt.sh --secret YOUR_SECRET${RESET}" >&2 + echo "" >&2 + echo -e " ${CYAN}2.${RESET} Create a ${CYAN}.env${RESET} file at ${YELLOW}$PORTAL_DB_ROOT/.env${RESET} with:" >&2 + echo -e " ${CYAN}POSTGREST_JWT_SECRET=your_secret_here${RESET}" >&2 + echo "" >&2 + echo -e " ${CYAN}3.${RESET} Set the ${CYAN}JWT_SECRET${RESET} environment variable:" >&2 + echo -e " ${CYAN}JWT_SECRET=your_secret ./postgrest-gen-jwt.sh${RESET}" >&2 + echo "" >&2 + echo -e "${YELLOW}Note: The secret must match the one configured in postgrest.conf${RESET}" >&2 + echo -e "${YELLOW}Run with --help for more information${RESET}" >&2 + exit 1 +fi # Allow short aliases for role names translate_role() { @@ -183,7 +298,7 @@ fi SIGNATURE=$(echo -n "$HEADER.$PAYLOAD" | openssl dgst -sha256 -hmac "$JWT_SECRET" -binary | base64url) # Complete JWT token -JWT_TOKEN="$HEADER.$PAYLOAD.$SIGNATURE" +POSTGREST_JWT_TOKEN="$HEADER.$PAYLOAD.$SIGNATURE" # ============================================================================ # Output @@ -191,7 +306,7 @@ JWT_TOKEN="$HEADER.$PAYLOAD.$SIGNATURE" if [[ "$TOKEN_ONLY" == true ]]; then # Just output the token for scripting - echo "$JWT_TOKEN" + echo "$POSTGREST_JWT_TOKEN" else # Full colorized output echo -e "${GREEN}${BOLD}๐Ÿ”‘ JWT Token Generated${RESET}" @@ -207,12 +322,12 @@ else echo "" echo -e "${BOLD}Token:${RESET}" - echo -e "${YELLOW}$JWT_TOKEN${RESET}" + echo -e "${YELLOW}$POSTGREST_JWT_TOKEN${RESET}" echo "" echo -e "${BOLD}Export to shell:${RESET}" - echo -e "${CYAN}export JWT_TOKEN=\"$JWT_TOKEN\"${RESET}" + echo -e "${CYAN}export POSTGREST_JWT_TOKEN=\"$POSTGREST_JWT_TOKEN\"${RESET}" echo "" echo -e "${BOLD}Usage:${RESET}" - echo -e "${CYAN}curl http://localhost:3000/organizations -H \"Authorization: Bearer \$JWT_TOKEN\"${RESET}" + echo -e "${CYAN}curl http://localhost:3000/organizations -H \"Authorization: Bearer \$POSTGREST_JWT_TOKEN\"${RESET}" echo "" fi diff --git a/portal-db/docker-compose.yml b/portal-db/docker-compose.yml index ddf3385e5..ddcf08f70 100644 --- a/portal-db/docker-compose.yml +++ b/portal-db/docker-compose.yml @@ -50,6 +50,8 @@ services: - ./schema/002_postgrest_init.sql:/docker-entrypoint-initdb.d/002_postgrest_init.sql:ro # 003_grove_backend.sql: Grove backend queries - ./schema/003_grove_backend.sql:/docker-entrypoint-initdb.d/003_grove_backend.sql:ro + # 004_grove_portal.sql: Grove portal queries + - ./schema/004_grove_portal_access.sql:/docker-entrypoint-initdb.d/004_grove_portal_access.sql:ro # 2. LOCAL DEV ONLY: mount set_authenticator_password.sql: Set authenticator password # - Required to set the authenticator role's password to 'authenticator_password' for the local development environment. @@ -79,6 +81,9 @@ services: # Mount PostgREST configuration file (see api/postgrest.conf) # Configuration docs: https://docs.postgrest.org/en/v13/references/configuration.html - ./api/postgrest.conf:/etc/postgrest/postgrest.conf:ro + # Mount JWKS (JSON Web Key Set) for dual JWT authentication + # Contains both HS256 (backend) and RS256 (Auth0) keys + - ./api/jwks.json:/etc/postgrest/jwks.json:ro command: ["postgrest", "/etc/postgrest/postgrest.conf"] depends_on: postgres: diff --git a/portal-db/schema/003_grove_backend.sql b/portal-db/schema/003_grove_backend.sql index dbbd4b045..1f42abd6b 100644 --- a/portal-db/schema/003_grove_backend.sql +++ b/portal-db/schema/003_grove_backend.sql @@ -1,8 +1,7 @@ -- ============================================================================ -- Auxiliary Services Queries -- ============================================================================ --- This file contains custom views to support auxiliary services --- like portal-workers, notifications, billing, etc. +-- This file contains custom views to support auxiliary services (portal-workers). -- ============================================================================ -- PORTAL WORKERS ACCOUNT DATA VIEW @@ -32,4 +31,4 @@ WHERE -- Grant select permissions to admin role only (admin has access to portal_users) GRANT SELECT ON portal_workers_account_data TO portal_db_admin; -COMMENT ON VIEW portal_workers_account_data IS 'Account data for portal-workers billing operations with owner email. Filter using WHERE portal_plan_type = ''PLAN_UNLIMITED'' AND billing_type = ''stripe'''; +COMMENT ON VIEW portal_workers_account_data IS 'Account data for portal-workers billing operations with owner email.'; diff --git a/portal-db/schema/004_grove_portal.sql b/portal-db/schema/004_grove_portal.sql deleted file mode 100644 index e69de29bb..000000000 diff --git a/portal-db/schema/004_grove_portal_access.sql b/portal-db/schema/004_grove_portal_access.sql new file mode 100644 index 000000000..fc4cafe38 --- /dev/null +++ b/portal-db/schema/004_grove_portal_access.sql @@ -0,0 +1,300 @@ +-- ============================================================================ +-- AUTH0 JWT INTEGRATION FOR FRONTEND USER ACCESS +-- ============================================================================ +-- This migration adds user-scoped access control for frontend users +-- authenticating via Auth0. Existing roles (portal_db_admin, portal_db_reader) +-- remain unchanged and are used by backend services. +-- +-- Overview: +-- - Creates 'authenticated_user' role for Auth0-authenticated frontend users +-- - Implements Row-Level Security (RLS) policies based on portal_account_rbac +-- - Users can only access portal accounts/applications they have RBAC permissions for +-- - Permission levels: 'legacy_read' (SELECT) and 'legacy_write' (INSERT/UPDATE/DELETE) +-- ============================================================================ + +-- ============================================================================ +-- ROLES +-- ============================================================================ + +-- New role for Auth0-authenticated frontend users +CREATE ROLE authenticated_user NOLOGIN; +COMMENT ON ROLE authenticated_user IS 'Role for Auth0-authenticated frontend users with user-scoped RLS policies'; + +-- Allow PostgREST authenticator to impersonate this role +GRANT authenticated_user TO authenticator; + +-- ============================================================================ +-- SCHEMA ACCESS +-- ============================================================================ + +-- Grant schema access +GRANT USAGE ON SCHEMA public, api TO authenticated_user; + +-- ============================================================================ +-- TABLE PERMISSIONS +-- ============================================================================ + +-- Grant table access (users will only be able to see/modify their own data via RLS) +GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE + portal_accounts, + portal_account_rbac, + portal_applications, + portal_users +TO authenticated_user; + +-- Grant access to public tables used by the UI (read-only, contains no sensitive data) +GRANT SELECT ON TABLE + services, + portal_plans, +TO authenticated_user; + +-- Grant access to portal_user_auth for JWT sub claim lookup +GRANT SELECT ON TABLE portal_user_auth TO authenticated_user; + +-- Grant sequence access for inserts +GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO authenticated_user; + +-- ============================================================================ +-- HELPER FUNCTION: Extract portal_user_id from Auth0 JWT sub claim +-- ============================================================================ + +CREATE OR REPLACE FUNCTION api.current_portal_user_id() +RETURNS VARCHAR(36) AS $$ +DECLARE + auth_sub TEXT; + user_id VARCHAR(36); +BEGIN + -- Extract 'sub' claim from JWT (e.g., "auth0|6536b4a897072b320a2d41ea") + auth_sub := current_setting('request.jwt.claims', true)::json->>'sub'; + + IF auth_sub IS NULL THEN + RETURN NULL; + END IF; + + -- Look up portal_user_id from portal_user_auth + SELECT pua.portal_user_id INTO user_id + FROM portal_user_auth pua + WHERE pua.auth_provider_user_id = auth_sub + LIMIT 1; + + RETURN user_id; +END; +$$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + +COMMENT ON FUNCTION api.current_portal_user_id() IS 'Extracts portal_user_id from Auth0 JWT sub claim by looking up auth_provider_user_id'; + +-- ============================================================================ +-- RLS POLICIES: portal_accounts (user-scoped access) +-- ============================================================================ + +-- Users can SELECT accounts they have RBAC access to +CREATE POLICY portal_accounts_user_select ON portal_accounts + FOR SELECT + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + WHERE par.portal_user_id = api.current_portal_user_id() + ) + ); + +-- Users can INSERT new accounts (WITH CHECK will verify they have write permission) +CREATE POLICY portal_accounts_user_insert ON portal_accounts + FOR INSERT + TO authenticated_user + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can UPDATE accounts where they have 'legacy_write' permission +CREATE POLICY portal_accounts_user_update ON portal_accounts + FOR UPDATE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ) + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can DELETE accounts where they have 'legacy_write' permission +CREATE POLICY portal_accounts_user_delete ON portal_accounts + FOR DELETE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- ============================================================================ +-- RLS POLICIES: portal_applications (user-scoped access) +-- ============================================================================ +-- Note: Application access inherits from parent account permissions + +-- Users can SELECT applications if they have access to the parent account +CREATE POLICY portal_applications_user_select ON portal_applications + FOR SELECT + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + WHERE par.portal_user_id = api.current_portal_user_id() + ) + ); + +-- Users can INSERT applications if they have 'legacy_write' on parent account +CREATE POLICY portal_applications_user_insert ON portal_applications + FOR INSERT + TO authenticated_user + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can UPDATE applications if they have 'legacy_write' on parent account +CREATE POLICY portal_applications_user_update ON portal_applications + FOR UPDATE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ) + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can DELETE applications if they have 'legacy_write' on parent account +CREATE POLICY portal_applications_user_delete ON portal_applications + FOR DELETE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- ============================================================================ +-- RLS POLICIES: portal_account_rbac (user-scoped access) +-- ============================================================================ + +-- Users can view their own RBAC entries +-- IMPORTANT: This policy must be simple to avoid infinite recursion when other +-- tables query portal_account_rbac. Users can only see RBAC rows that directly +-- reference their portal_user_id. +CREATE POLICY portal_account_rbac_user_select ON portal_account_rbac + FOR SELECT + TO authenticated_user + USING (portal_user_id = api.current_portal_user_id()); + +-- Users can INSERT RBAC entries if they have 'legacy_write' on the account +CREATE POLICY portal_account_rbac_user_insert ON portal_account_rbac + FOR INSERT + TO authenticated_user + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can UPDATE RBAC entries if they have 'legacy_write' on the account +CREATE POLICY portal_account_rbac_user_update ON portal_account_rbac + FOR UPDATE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ) + WITH CHECK ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- Users can DELETE RBAC entries if they have 'legacy_write' on the account +CREATE POLICY portal_account_rbac_user_delete ON portal_account_rbac + FOR DELETE + TO authenticated_user + USING ( + portal_account_id IN ( + SELECT par.portal_account_id + FROM portal_account_rbac par + JOIN rbac r ON r.role_name = par.role_name + WHERE par.portal_user_id = api.current_portal_user_id() + AND 'legacy_write' = ANY(r.permissions) + ) + ); + +-- ============================================================================ +-- RLS POLICIES: portal_users (self-access only) +-- ============================================================================ + +-- Users can view their own user record +CREATE POLICY portal_users_self_select ON portal_users + FOR SELECT + TO authenticated_user + USING (portal_user_id = api.current_portal_user_id()); + +-- Users can update their own record +CREATE POLICY portal_users_self_update ON portal_users + FOR UPDATE + TO authenticated_user + USING (portal_user_id = api.current_portal_user_id()) + WITH CHECK (portal_user_id = api.current_portal_user_id());